On Sun, Aug 24, 2008 at 09:14:25PM +0200, Tony Mechelynck wrote:
> 
> On 24/08/08 08:01, Robert Webb wrote:
> > Tony Mechelynck wrote:
> >
> >>> What's the simplest way to move the cursor to the start of
> >>> the word under it?
> >>> "Under it" includes the word after the cursor if there's no
> >>> identifier under it.
> >> ...
> >>    viw<Esc>`<
> >
> > Won't work if cursor is in the space before the word.
> >
> > Weird actually how all those motion commands like iw work differently from
> > every other vim command that uses a word under the cursor.  The vim commands
> > all use the next word if there isn't one under the cursor, which is what I
> > want to do.
> >
> >>    yiw
> >
> > Same problem as above.  If it wasn't for the space under the cursor I could
> > just use wb which works very well provided the cursor is already on the
> > actual word.
> >
> > Thanks,
> > Rob.
> 
> What about eb then? (forward to end of word, then back to begin of 
> word). Hm, this works when in the space between words, but not when on 
> the last letter of a word. OK: heb (left one, right to end of word, left 
> to begin of word). Hm, this one beeps (and does nothing) when on the 
> first character of a line... with the cursor ending up where it should 
> unless the line begins with whitespace... then maybe
> 
>       :silent! normal! heb
> 
> ?
> 
> 
> Best regards,
> Tony.
> -- 
> hundred-and-one symptoms of being an internet addict:
> 143. You dream in pallettes or 256 colors.
> 
> > 
wb seems to work fine to me, am I missing something?
-- 
Med vänliga hälsningar
Fredrik Gustafsson

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui