Thursday, March 25, 2010

Re: 'w' command to actually move to the next word

On 26 March 2010 02:38, AK wrote:

> Antony Scriven wrote:
>
> [...]
>
> > Well, if you're doing it properly you should perhaps map
> > w to a function. Maybe something along the lines of:
> >
> >    nno <silent> <buffer> :<C-U>silent call <SID>MyWFunction(v:count1,
> > ...)<CR>
> >    ono <silent> ... maybe something slightly different ...
> >
> > Because you just know that there will be corner cases
> > that require special handling.
>
> Indeed, I'm also thinking about that because I find
> :hlsearch very useful and doing /\i\+ necessitates
> mapping :nohl after it, but this leads to some ugly
> flicker in gvim. So, if someone more experienced than me
> makes a function that'd be awesome; if not, I will
> eventually make one myself I guess.

No, make one yourself now. It will be instructive. And if it
doesn't work send what you do have to the list and we'll
help. And that way it will not be instructive just for you
but also for other readers of this list.

> My thinking on this issue is that w/b would be much
> easier to move around than f/F in most cases if, well,
> w/b worked sensibly. The trouble with w/b is that my
> brain just doesn't parse a few punctuation chars together
> as a word [...]

Well that's why I use / and ? almost exclusively for moving
about: it's consistent, works for small and large distances,
and if you can touch-type is about as instantaneous as you
can get. But I probably would make use of a `w' that worked
as you've described. Things such as `dw' will require
careful thought however. I might be inclined to leave them
as they are. --Antony

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: