Edward Xu wrote:
Hi All,
My project has lots of different type files(*.c/*.mak/*.pl, etc). And i work on this project with lots of people, so i want to add a new syntax keyword for myself.
so i added below code in vimrc:

*function! Reloadsyn()*
*    syn keyword myTodo Edward*
*    hi def link myTodo Todo*
*endfunction*
*au BufEnter *.* call Reloadsyn()*

but i want to highlight this keyword in comments, so i think there is a argument "contained" needed here. But how can i add myTodo into different comments syntax group(lots of file types in my project) via "contains" argument.

Try "containedin" instead.

ie. *syn keyword myTodo Edward containedin=cCommentGroup,makeComment,perlComment

*(note: I didn't test this)

Regards,
Chip Campbell

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