lucentjames wrote:
> What I need to do is have some list of keyword group (keyword
> that have special chararters eg / . ? [ ])and use VIM to mark
> to different color.

Syntax rules can be used, or highlighting with matchad().

One approach would be to use this tip (it uses matchadd()):
http://vim.wikia.com/wiki/Highlight_multiple_words

Use :Hsample to show a sample of the hightlights, which you can
change by editing the supplied highlights.csv file.

Assuming you want the same highlights over several sessions, you
could put commands like these in a file (say my.vim):

Hi 7 alpha
Hi 8 beta
Hi 9 gamma.delta

In Vim, use this command to source (apply) the commands:

:so my.vim

The '.' in 'gamma.delta' matches any character. It's an easy way
of highlighting 'gamma delta' (with a space).

Hmmm, looking at the tip I see that I had forgotten about :Hsave
and :Hrestore which would be another way to save settings.

John

-- 
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

Reply via email to