Thursday, December 25, 2014

Re: how to display different color in vi

* skyworld <chenyong20000@gmail.com> [2014-12-25 10:52]:
> I have tried several times, but always failed.
> :match abc /\<yellow\>/
> :highlight abc ctermbg=green guibg=green
> :match abc /\<red\>/

here we go..

:syn match yellow "\<yellow\>"
:hi yellow ctermbg=yellow guibg=yellow
:syn match red "\<red\>"
:hi red ctermbg=red guibg=red

save this to eg red_and_yellow.vim
and then ":source red_and_yellow.vim"

see also:
:view $VIMRUNTIME/syntax/colortest.vim
:source %

Sven

--
http://www.guckes.net/vim/syntax/sven.vim

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