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

Re: Spellcheck on Tex-Files

Expand Messages
  • skeept
    ... Thank you very much! With the help of your plugin HILINKS and your last suggestion I was finally able to get it to work. The version I have in my config
    Message 1 of 13 , Nov 1, 2012
      On Wednesday, October 31, 2012 5:45:57 PM UTC-4, DrChip wrote:
      > xxx wrote:
      >
      > > I would really appreciate a specific example on how to acomplish this.
      >
      > > My last try is syn region texComment matchgroup=texStatement
      >
      > > start='{tabular}{' end='}' \ contains=@NoSpell but it doesn't work...
      >
      > You almost had it earlier; you need to have your new region contained in
      >
      > texDocZone:
      >
      >
      >
      > syn region texTabularPos matchgroup=texStatement
      >
      > start='\\begin\s*{\s*tabular\s*}{' end='}' fold
      >
      > contains=@texFoldGroup,@texDocGroup,@NoSpell containedin=texDocZone
      >
      >
      >
      > That may not be the only region that it needs to be contained in, however.
      >
      >
      >
      > I use my :HLT! command available with my plugin hilinks.vim:
      >
      > http://www.drchip.org/astronaut/vim/index.html#HILINKS
      >
      >
      >
      > Then you can move your cursor around and determine which syntax region
      >
      > is currently active under the cursor.
      >
      >
      >
      > Regards,
      >
      > C Campbell

      Thank you very much!
      With the help of your plugin HILINKS and your last suggestion I was finally able to get it to work.
      The version I have in my config file (which I would not be able to write without your plugin) is:

      syn region texTabularPos matchgroup=texStatement
      \ start='\\begin\s*{\s*tabular\s*}[^}]*{' end='}' fold
      \ contains=@texFoldGroup,@texDocGroup,@NoSpell
      \ containedin=texDocZone,texChapterZone,texSectionZone,texSubSectionZone

      Since I got this far, I would ask a related question.
      Some authors names are first classified as bad spelling. For some names, say
      Al-Faiz both words Al and Faiz are spelling errors. They are actually a name but unless they appear together this should be a bad spelling.
      An idea I have is to define a command
      \nospell and then when writing the name I would just write \nospell{Al-Faiz} and then I could instruct vim not to spell that region, using a technique similar to the above one.
      Any idea on this?

      Thanks!

      --
      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
    • Charles Campbell
      ... Glad you could get it to work. If you can live with - signs in your keyword (see :help isk ), then making names part of a keyword list (and
      Message 2 of 13 , Nov 2, 2012
        skeept wrote:
        > Thank you very much! With the help of your plugin HILINKS and your
        > last suggestion I was finally able to get it to work. The version I
        > have in my config file (which I would not be able to write without
        > your plugin) is: syn region texTabularPos matchgroup=texStatement \
        > start='\\begin\s*{\s*tabular\s*}[^}]*{' end='}' fold \
        > contains=@texFoldGroup,@texDocGroup,@NoSpell \
        > containedin=texDocZone,texChapterZone,texSectionZone,texSubSectionZone
        > Since I got this far, I would ask a related question. Some authors
        > names are first classified as bad spelling. For some names, say
        > Al-Faiz both words Al and Faiz are spelling errors. They are actually
        > a name but unless they appear together this should be a bad spelling.
        > An idea I have is to define a command \nospell and then when writing
        > the name I would just write \nospell{Al-Faiz} and then I could
        > instruct vim not to spell that region, using a technique similar to
        > the above one. Any idea on this? Thanks!
        Glad you could get it to work.

        If you can live with "-" signs in your keyword (see :help 'isk'), then
        making names part of a keyword list (and contains=@NoSpell) should
        work. Keywords are the fastest (using a hashing method for recognition)
        plus have top priority (so you won't need to worry about the
        containedin=... list).

        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
      • skeept
        ... Thanks for the suggestion, I have thought about that before but I prefer not to add - to iskeyword. I did add : which makes completion for references
        Message 3 of 13 , Nov 3, 2012
          On Friday, November 2, 2012 9:50:51 AM UTC-4, Charles Campbell wrote:
          > skeept wrote:
          >
          > > Thank you very much! With the help of your plugin HILINKS and your
          >
          > > last suggestion I was finally able to get it to work. The version I
          >
          > > have in my config file (which I would not be able to write without
          >
          > > your plugin) is: syn region texTabularPos matchgroup=texStatement \
          >
          > > start='\\begin\s*{\s*tabular\s*}[^}]*{' end='}' fold \
          >
          > > contains=@texFoldGroup,@texDocGroup,@NoSpell \
          >
          > > containedin=texDocZone,texChapterZone,texSectionZone,texSubSectionZone
          >
          > > Since I got this far, I would ask a related question. Some authors
          >
          > > names are first classified as bad spelling. For some names, say
          >
          > > Al-Faiz both words Al and Faiz are spelling errors. They are actually
          >
          > > a name but unless they appear together this should be a bad spelling.
          >
          > > An idea I have is to define a command \nospell and then when writing
          >
          > > the name I would just write \nospell{Al-Faiz} and then I could
          >
          > > instruct vim not to spell that region, using a technique similar to
          >
          > > the above one. Any idea on this? Thanks!
          >
          > Glad you could get it to work.
          >
          >
          >
          > If you can live with "-" signs in your keyword (see :help 'isk'), then
          >
          > making names part of a keyword list (and contains=@NoSpell) should
          >
          > work. Keywords are the fastest (using a hashing method for recognition)
          >
          > plus have top priority (so you won't need to worry about the
          >
          > containedin=... list).
          >
          >
          >
          > Regards,
          >
          > Chip Campbell


          Thanks for the suggestion, I have thought about that before but I prefer not to add - to iskeyword. I did add : which makes completion for references easier (so I can type eqn:<C-N> and have a list of possible words starting with eqn:)

          Regards,
          Jorge Rodrigues

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