Chandra <[email protected]> wrote: > Hello, > I see a syntax behavior change between vim 7.4 and earlier > version. (We are yet to update VIM version to 8.0+ in our company.) > > I use different syntax for lines that begin with "//" (Comments) and > lines that begin with "//:" (embedded Perl Code). I was able to > achieve this with earlier version of vim by specifying this in the > syntax file, > > syn match embPerlCode "^\s*//:.*" > > and this in .gvimrc, > > highlight embPerlCode gui=bold guifg=maroon > > This works fine in version 7.2 (didn't check in 7.3). But in version > 7.4 the behavior has changed. The embPerlCode lines are > shown with syntax color of Comments. > > Is there a way to get around this and get back the previous behavior?
Using vim-8.0.543 (gtk3 gui), it works as expected for me i.e. I see different colors for comments if I do: $ vim -f -g \ -c 'syntax on' \ -c 'setfiletype cpp' \ -c 'syn match embPerlCode "^\s*//:.*"' \ -c 'hi embPerlCode gui=bold guifg=maroon' \ -c 'call setline(1, ["// a cpp comment", "//: an empPerlCode comment"])' Can you double check? If you use vim-7.2 or 7.3, you're missing a lot of fixes and useful new features. Dominique -- -- You received this message from the "vim_use" 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 --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
