91187Re: "ce" deletes two words if the current one is 1-letter long?
- Jun 3 9:32 AMOn 6/3/08, Benjamin Fritz <fritzophrenic@...> wrote:
> On 6/3/08, François Ingelrest <athropos@...> wrote:In addition, text-objects can be used with the cursor _anywhere_
> > On Tue, Jun 3, 2008 at 5:51 PM, Benjamin Fritz <fritzophrenic@...> wrote:
> > > On 6/3/08, François Ingelrest <athropos@...> wrote:
> > >> Hi all,
> > >>
> > >> I frequently use "ce" to replace the current word, so I go to the the
> > >> beginning of that word and type "ce". I've noticed that when the
> > >> current word is 1-letter long, the following word gets deleted too.
> > >> For instance, if I place the cursor on the 'a' of "an objective" and
> > >> type "ce", I replace only "an". If I do the same thing with "a
> > >> server", I replace both words.
> > >>
> > >> Is that really the intended behavior? Shouldn't "changing until the
> > >> end of the current word" stop at the current cursor position if that
> > >> current word is 1-letter long?
> > >
> > > The problem with this would be that 'e' needs to be able to move from
> > > word to word. If it stays in place when the cursor is on a 1-letter
> > > word, the cursor would be "stuck" on that word, unable to progress to
> > > the next with a subsequent keypress. Note, for changing a
> > > single-letter word, you can train yourself to use the "s" command
> > > instead, which is a synonym for "cl".
> > While I understand your argument about jumping through words, it seems
> > quite strange to me that I need to take care of whether the current
> > word has multiple letters or not. Of course I can get used to "s", but
> > it's just strange that I need to take care of that. Maybe I can remap
> > "ce" to use either "ce" or "s" based on the length of the current
> > word?
> Actually, an alternate idea that has proved infinitely more useful to me:
> Use text-objects. Instead of "ce" try using "ciw" which will work on
> words of all lengths and is (I have found) usually what I want to do
> See :help text-objects and :help iw
within the word, instead of requiring you to place the cursor at the
beginning of the word.
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
- << Previous post in topic Next post in topic >>