Wednesday, January 23, 2013

Re: spell check for the line contains "#"

Hi lei!

On Mi, 23 Jan 2013, lei yang wrote:

> Hi experts,
>
> I only want enable spell checking for the line contains # ----> "#
> often is the comments" , in another word
> I only want to check the comment line, how could I do?

Put this into a file called ~/.vim/after/syntax/<lang>.vim (create
directories that don't exist, replace <lang> by the actual filetype):

,----[ ~/.vim/after/syntax/foobar.vim ]-
| syn match myCommentSpell /#.*/ contains=@Spell
| hi link myCommentSpell Comment
`----

If you need this for several filetypes, I think the easiest solution is
to symlink all of them to the above file.


regards,
Christian
--
Die Jugend wäre eine noch viel schönere Zeit, wenn sie erst später im
Leben käme.
-- Charlie Chaplin

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

No comments: