whichwrap h and k are "not recommended"?

32 views
Skip to first unread message

Wincent Colaiuta

unread,
Feb 18, 2009, 5:14:05 PM2/18/09
to vim_use
I'm fairly new to Vim and I just found out about the "whichwrap"
setting.

In the help it says that adding "h" and "l" to the list is "not
recommended".

I'm extremely tempted to add those to "whichwrap" (along with <, >, [,
and ]), but before I do I wanted to ask the veterans why "h" and "l"
in particular are labelled as "not recommended". Basically, I wouldn't
want to develop a bad habit here that will later haunt me once I
become more experienced with Vim.

Cheers,
Wincent

Ben Fritz

unread,
Feb 18, 2009, 9:39:06 PM2/18/09
to vim_use
A lot of people like the fact that h and l stop at line boundaries. It
lets them press it repeatedly or with a count without worrying about
wrapping to the next line. Additionally, there is a possibility that
plugins and mappings assume this behavior and will break if you have
them included in whichwrap.

But it's really all a matter of preference. Personally, I like having
them wrap. I've never found a situation where I wish I hadn't set them
up to do so.

_sc_

unread,
Feb 18, 2009, 9:55:56 PM2/18/09
to vim...@googlegroups.com
On Wednesday 18 February 2009 8:39 pm, Ben Fritz wrote:
>
> On Feb 18, 4:14 pm, Wincent Colaiuta <w...@wincent.com> wrote:
> > I'm fairly new to Vim and I just found out about the "whichwrap"
> > setting.
> >
> > In the help it says that adding "h" and "l" to the list is "not
> > recommended".
[...]

> wrapping to the next line. Additionally, there is a possibility that
> plugins and mappings assume this behavior and will break if you have
> them included in whichwrap.

i've had 'h' and 'l' in my whichwrap for decades and don't remember
a single time it broke a script, but YMMV

</me knocks on wood>

sc


Reply all
Reply to author
Forward
0 new messages