tags:

views:

76

answers:

1

I'm beginning to learn VIM (I've downloaded an emulator plugin for my IDE) and unsurprisingly it's making me irritated and extremely slow. That is all fine and I realize it's a phaze everyone goes through.

However this one feature is quite frustrating - being unable to jump to the next line via l, previous with h or search more than one line with f.

Is there a valid, typing speed enhancing reason for this?

+3  A: 

You can make h and l wrap lines by adding h and l to the whichwrap option (:he whichwrap), although for the sake of compatibility with scripts and macros that don't expect h and l to wrap, you might want to avoid adding them, and add the < and > options instead (which allow the left and right arrow keys to wrap).

As for f (and F and t and T), they're just really not meant to do that, but you can use / and ? as movements -- d/foo<Enter> to delete everything between here and a following "foo" (whether it's on this line or a later one).

hobbs
*>As for f (and F and t and T), they're just really not meant to do that...* But is there reason they aren't?
Raveren
Two reasons. The first, philosophical one: because they're short-range movements. Since they only search for a single letter, they get less useful and more error-prone the further you want t ogo, and so it's not worth using them over multiple lines. The second, pragmatic one: because that's how it worked 35 years ago when vi was a descendant of a line-based editor, and since other commands exist that *can* do the same thing across lines, it wasn't seen as necessary to break compatibility for `f` and friends.
hobbs