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

Re: [vim] how to spell check from vim?

Expand Messages
  • Charles E. Campbell
    ... Engspchk allows you to have a custom dictionary (your own wordlist) as well as a built-in standard one. It also supports suggesting alternative spellings.
    Message 1 of 6 , May 1, 2002
    • 0 Attachment
      Thus saith M K Saravanan:
      > Sorry for asking if the qn. is very basic. How to spell check from vim?
      > Is it possible to add own own list of words to the dictionary?
      ---------------------------------------------------------------------

      Engspchk allows you to have a custom dictionary (your own wordlist) as
      well as a built-in standard one. It also supports suggesting
      alternative spellings. With the exception of the latter, engspchk is a
      native-vim app. Here's a couple of links to get you started
      (English):

      http://www.erols.com/astronaut/vim/index.html#Spelling
      http://vim.sourceforge.net/scripts/script.php?script_id=195

      For Dutch, English, German, Hungarian, and Yiddish, see:

      http://vim.sourceforge.net/tips/tip.php?tip_id=152

      Included in that last tip is a link to a script for
      transforming engspchk to handle other languages so
      long as you have a dictionary.

      Regards,
      Chip Campbell

      --
      Charles E Campbell, Jr, PhD _ __ __
      Goddard Space Flight Center / /_/\_\_/ /
      cec@... /_/ \/_//_/
      PGP public key: http://www.erols.com/astronaut/pgp.html
    • Edwin
      Hello everyone, I m finally starting to take advantage of the folding mechanism and have read the fold.txt documentation, but was not able to figure out how to
      Message 2 of 6 , May 1, 2002
      • 0 Attachment
        Hello everyone,

        I'm finally starting to take advantage of the folding
        mechanism and have read the fold.txt documentation, but
        was not able to figure out how to do the following:

        1) Make the Markers {{{ and }}} non-visible.
        I tried an autocommand, but was not successful.
        au BufRead,BufNewFile * syn match fmrkr "{{{" |
        \ hi fmrkr guibg=black guifg=black
        Is it possible to make the markers black_on_black?

        2) Instead of folding multiple _complete_ rows, is it
        possible to fold only a block of data. The following
        is a simplified example of what I want to do. I want
        to turn the following

        Time Tx0 Tx1 Rx0 Rx1
        ----------------------------------------
        0 aaaaa bbbbb
        aaaaa bbbbb
        aaaaa bbbbb
        10 aaaaa
        aaaaa
        aaaaa
        20 bbbbb
        bbbbb
        bbbbb

        into
        ||
        VV

        Time Tx0 Tx1 Rx0 Rx1
        ----------------------------------------
        0 *aaaaa* bbbbb
        bbbbb
        bbbbb
        10 aaaaa
        aaaaa
        aaaaa
        20 bbbbb
        bbbbb
        bbbbb

        by folding only the Tx0's 2 line "aaaaa". I
        know this is more than likely not possible, but
        I thought it was worth a shot. Having possibly
        100's of Tx0 and Tx1 data, would this be feasible
        with a vim script?

        Any answers, ideas, suggestions or comments would
        be greatly appreciated.

        Thanks,
        Edwin-

        __________________________________________________
        Do You Yahoo!?
        Yahoo! Health - your guide to health and wellness
        http://health.yahoo.com
      • Colin Keith
        ... This is actually in the man page, you just have to read it ... To match extra items in comments, use the cCommentGroup cluster. Example: ... But the
        Message 3 of 6 , May 2, 2002
        • 0 Attachment
          On Wed, May 01, 2002 at 09:17:38PM -0700, Edwin wrote:
          > 1) Make the Markers {{{ and }}} non-visible.
          > I tried an autocommand, but was not successful.
          > au BufRead,BufNewFile * syn match fmrkr "{{{" |
          > \ hi fmrkr guibg=black guifg=black
          > Is it possible to make the markers black_on_black?

          This is actually in the man page, you just have to read it
          carefully to see that its there:

          :help c-syntax

          "To match extra items in comments, use the cCommentGroup cluster.
          Example: >
          :au Syntax c call MyCadd()
          :function MyCadd()
          : syn keyword cMyItem contained Ni
          : syn cluster cCommentGroup add=cMyItem
          : hi link cMyItem Title
          :endfun"

          But the important line is:

          syn cluster cCommentGroup add=fmrkr

          I.e. change your au command to:

          au BufRead,BufNewFile * syn match fmrkr '{{{\d*' |
          \ syn cluster cCommentGroup add=fmrkr |
          \ hi fmrkr term=NONE guibg=black guifg=black
          \ ctermfg=black ctermbg=black

          Also note the syntax change as you will probably want to specify
          the fold level too. Now you can check that this works by placing
          the cursor on one of the folds and entering:

          :echo synIDattr(synID(line('.'), col('.'), 1), 'fg')
          :echo synIDattr(synID(line('.'), col('.'), 1), 'bg')



          > 2) Instead of folding multiple _complete_ rows, is it
          > possible to fold only a block of data. The following
          > is a simplified example of what I want to do. I want
          > to turn the following

          I'm pretty sure the answer is no. More syntax highlighting to
          black perhaps? :)


          Anyway, this works for me, and is quite cute - perhaps you should
          post it to the tips section of vim.sf.net ...

          Colin.
        • Benji Fisher
          ... It might also work to use the containedin option. ... HTH --Benji Fisher
          Message 4 of 6 , May 2, 2002
          • 0 Attachment
            Colin Keith wrote:
            >
            > On Wed, May 01, 2002 at 09:17:38PM -0700, Edwin wrote:
            > > 1) Make the Markers {{{ and }}} non-visible.
            > > I tried an autocommand, but was not successful.
            > > au BufRead,BufNewFile * syn match fmrkr "{{{" |
            > > \ hi fmrkr guibg=black guifg=black
            > > Is it possible to make the markers black_on_black?
            >
            > This is actually in the man page, you just have to read it
            > carefully to see that its there:
            >
            > :help c-syntax
            >
            > "To match extra items in comments, use the cCommentGroup cluster.
            > Example: >
            > :au Syntax c call MyCadd()
            > :function MyCadd()
            > : syn keyword cMyItem contained Ni
            > : syn cluster cCommentGroup add=cMyItem
            > : hi link cMyItem Title
            > :endfun"
            >
            > But the important line is:
            >
            > syn cluster cCommentGroup add=fmrkr
            >
            > I.e. change your au command to:
            >
            > au BufRead,BufNewFile * syn match fmrkr '{{{\d*' |
            > \ syn cluster cCommentGroup add=fmrkr |
            > \ hi fmrkr term=NONE guibg=black guifg=black
            > \ ctermfg=black ctermbg=black
            >
            > Also note the syntax change as you will probably want to specify
            > the fold level too. Now you can check that this works by placing
            > the cursor on one of the folds and entering:
            >
            > :echo synIDattr(synID(line('.'), col('.'), 1), 'fg')
            > :echo synIDattr(synID(line('.'), col('.'), 1), 'bg')

            It might also work to use the "containedin" option.

            :help :syn-containedin

            HTH --Benji Fisher
          Your message has been successfully submitted and would be delivered to recipients shortly.