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

spell check for the line contains "#"

Expand Messages
  • lei yang
    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,
    Message 1 of 3 , Jan 22, 2013
    • 0 Attachment
      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?


      Lei

      --
      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
    • Ben Fritz
      ... Enable filetype detection and syntax highlighting. Spell checking integrates with syntax highlighting to determine what regions allow spell checking. Many
      Message 2 of 3 , Jan 23, 2013
      • 0 Attachment
        On Wednesday, January 23, 2013 12:02:21 AM UTC-6, 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?
        >

        Enable filetype detection and syntax highlighting. Spell checking integrates with syntax highlighting to determine what regions allow spell checking.

        Many (but not all) syntax files already define these regions. If things don't work as you expect after enabling spell checking on a highlighted file, let us know what filetype you are editing and perhaps we can give more help.

        --
        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
      • 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 3 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.