On 07:26 Wed 11 Apr , Ben Fritz wrote:
> On Wednesday, April 11, 2012 5:54:55 AM UTC-5, Marcin Szamotulski wrote:
> > Hello,
> >
> > It seems for me that cw and ce commands works the same while dw and de and
> > other operator like commands have a different behaviour. I did testing with
> > "vim -u NONE" (I also use the default 'cpo').
> >
> > How to reproduce:
> >
> > put the cursor at the beginning of word1 and try both cw and ce normal
> > commands:
> >
> > word1 word2
> >
> >
> > In both cases the space between word1 and word2 is not deleted, while I
> > expect
> > that cw would make the change up to word3.
> >
>
> >From the help:
>
> > *cw* *cW*
> > Special case: When the cursor is in a word, "cw" and "cW" do not include the
> > white space after a word, they only change up to the end of the word. This
> > is
> > because Vim interprets "cw" as change-word, and a word does not include the
> > following white space.
> > {Vi: "cw" when on a blank followed by other blanks changes only the first
> > blank; this is probably a bug, because "dw" deletes all the blanks; use the
> > 'w' flag in 'cpoptions' to make it work like Vi anyway}
> >
> > If you prefer "cw" to include the space after a word, use this mapping: >
> > :map cw dwi
> > Or use "caw" (see |aw|).
>
> --
> 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
Great. I don't think adding another cpo flag is necessary as ":help cw" also
suggest a nice solution:
map cw dwi
or to use "caw" command.
Thanks!
Marcin
--
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