Loading ...
Sorry, an error occurred while loading the content.

Re: spell check for the line contains "#"

Expand Messages
  • Christian Brabandt
    Hi lei! ... Put this into a file called ~/.vim/after/syntax/ .vim (create directories that don t exist, replace by the actual filetype): ,----[
    Message 1 of 3 , Jan 23, 2013
    • 0 Attachment
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.