Wednesday, December 24, 2014

RE: how to display different color in vi

skyworld wrote:
> normally I use gvim instead of vi. My question is for gvim is:
> can i use different color to show diffent word? For example,
> I would like to highlight word "red" with red and "yellow"
> with color yellow in one document. Is this possible?

The tip for that is:
http://vim.wikia.com/wiki/Highlight_multiple_words

It can be done manually to a limited extent. In the following,
"Search" and "Error" are highlight groups that should be
displayed by default with the ":highlight" command.

:match Search /\<yellow\>/
:2match Error /\<red\>/

To switch highlighting off:

:match none
:2match none

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

---
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: