Incorrect highlighting of VimL syntax

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Incorrect highlighting of VimL syntax

Lech Lorens
The following VimL line does not the correct highlighting for me:
  set isfname-=\"

What I get after executing
  for id in synstack(line("."), col("."))
      echo synIDattr(id, "name")
  endfor
with cursor positioned on "set" is:
  vimIsCommand
  vimCommand

While if I change the set command to state
  set isfname-=a

I get
  vimSet
  vimCommand

I'd say that the problem is with the syntax highlighting file, but I dug
into syntax.txt and read (syn-priority):
  1. When multiple Match or Region items start in the same position, the item
     defined last has priority.

In syntax/vim.vim (version 7.2-95) vimSet is defined on line 284, while
vimIsCommand is defined on line 100. Both should match at this position,
so if the vimSet region is defined later in the syntax file, I would
expect it to take precedence. Since it isn't so, I can't help but
believe that either this is an error in Vim or in syntax highlighting
documentation.

Obviously, it is possible that I misunderstand the documentation. In
this case this might be a problem with syntax/vim.vim. I'll be grateful
for any comments.

--
Cheers,
Lech

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php