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

Re: Suggestion: allow 'z=' when spell-checking isn't on

Expand Messages
  • Bram Moolenaar
    ... Isn t the problem that zw is intended to use the word under the cursor, but it uses the next word marked as misspelled? I haven t actually tried it...
    Message 1 of 18 , Sep 10, 2013
      Christian Brabandt wrote:

      > On Sa, 07 Sep 2013, Gary Johnson wrote:
      > > On 2013-08-12, Gary Johnson wrote:
      > > > On 2013-08-12, Christian Brabandt wrote:
      > >
      > > > > Oh well, here is an updated version attached. Yes, it is really
      > > > > attached...
      > > >
      > > > I'm glad to have the updated patch. Thank you. It is working fine
      > > > so far. I'll let you know if that changes.
      > >
      > > I just noticed an odd behavior of the spell feature with your patch
      > > included. I did not have 'spell' enabled but checked the spelling
      > > of a word with z=. The word was not in the list, so I found the
      > > correct spelling on the web, changed the word in my text, and
      > > attempted to add it to my spelling list with zg. Two messages
      > > appeared:
      > >
      > > E756: Spell checking is not enabled
      > > Word added to ~/.vim/spell/en.utf-8.add
      > >
      > > Since the word was added successfully, it seems that the error
      > > message should not have appeared.
      > That is actually a strange behaviour of normal Vim and has nothing to do
      > with my patch.
      > Bram,
      > problem is, nv_zet calls spell_move_to() function, which errors out, if
      > spell checking is not enabled. But if spell checking is not enabled, Vim
      > uses find_ident_under_cursor() to get the identifier under the cursor and
      > adds this nevertheless to the spellfile.
      > I think, this can cause vim to add/remove different words to the
      > spellfile, depending on the 'spell' setting, but I am not sure, how to
      > test (the second patch at least makes Vim mention, which word has been
      > added/removed).

      Isn't the problem that "zw" is intended to use the word under the
      cursor, but it uses the next word marked as misspelled? I haven't
      actually tried it...

      > Here is a patch, that prevents the spurious E756 error in the case of 'zg/zb'


      Some of the well known MS-Windows errors:
      EHUH Unexpected error
      EUSER User error, not our fault!
      EGOD Horrible problem, god knows what has happened
      EERR Errornous error: nothing wrong

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      You received this message from the "vim_dev" 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

      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.