jeromejj / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

vim.vim syntax highlighting bug when option string starts with 'z' #124

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I came upon this in the following manner.  In my vimrc, I added colorscheme 
zenburn.  The colorscheme is correctly highlighted, but the 'z' in zenburn 
doesn't appear to be correct. (See attached screenshot)  Checking the 
highlighting rules that are applied, the z was 'VimIsCommand,vimCommand' while 
the remainder of the word is 'vimIsCommand'.

It appears that in revision 916c90b37ea9adbe7dc1e866f85c6e5b49cfba25 
http://code.google.com/p/vim/source/detail?spec=svn916c90b37ea9adbe7dc1e866f85c6
e5b49cfba25&r=916c90b37ea9adbe7dc1e866f85c6e5b49cfba25 , the regex for 
vimCommand was changed and this leads to the bug.  Is there a distinct reason 
for that change, or should it be reverted back or modified somehow?

Original issue reported on code.google.com by ikirudennis on 21 Mar 2013 at 10:56

Attachments:

GoogleCodeExporter commented 9 years ago
Still seems to be an issue. CC'ing Charles, as he is the maintainer of the vim 
syntax file.

I think this patch fixes it:
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -23,7 +23,7 @@ syn keyword vimCommand contained      abc[lea
 syn keyword vimCommand contained       abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] cc
 syn keyword vimCommand contained       al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile
 syn keyword vimCommand contained       ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etf
-syn match   vimCommand contained       "\<z[-+^.=]\="
+syn match   vimCommand contained       "\<z[-+^.=]\=\>"
 syn keyword vimStdPlugin contained     DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns

 " vimOptions are caught only when contained in a vimSet {{{2

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 8:13

GoogleCodeExporter commented 9 years ago

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 9:23

GoogleCodeExporter commented 9 years ago

Original comment by chrisbr...@googlemail.com on 9 Jan 2015 at 12:26

GoogleCodeExporter commented 9 years ago
This bug has been fixed for awhile; looks like I neglected to close it.

Original comment by drc...@campbellfamily.biz on 9 Jan 2015 at 2:44

GoogleCodeExporter commented 9 years ago
This change is not in the distribution yet.  Perhaps you need to send your Vim 
syntax file to me?

Original comment by brammool...@gmail.com on 9 Jan 2015 at 6:28