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

91218Re: "ce" deletes two words if the current one is 1-letter long?

Expand Messages
  • Ben Schmidt
    Jun 3, 2008
    • 0 Attachment
      > The problem is your misunderstanding of the meaning of 'e'. It does
      > not mean "go to the end of the word." It means "go forward to the
      > next end of a word." You have assumed a meaning from your
      > experience with e's behavior when your cursor is at the start of a
      > multi-letter word. That assumption was reasonable in that context,
      > but it was incorrect.
      > You may find it useful to use 'cw' in place of your current use of
      > 'ce'. 'cw' should behave consistently and always change from the
      > cursor to the end of the current word. See
      > :help w
      > :help iw

      Hehe. I had never realised that 'cw' behaves consistently in this fashion, but it
      is very nice. I will be using it, as I had the same problem with 'e' and none of
      the other solutions work for me: I usually use 'ce' or 'de' once and then '.' a
      whole stack of times, so substituting 's' when I come to a single letter word is
      not an option, nor are text objects as I am often changing or removing word tails
      or suffixes.

      Pity it's completely inconsistent with the usual motion of 'w', and with 'w' with
      other operators, though. That was the assumption I made: that 'cw' would change
      the same text that 'dw' deleted. Wrong!



      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 10 messages in this topic