This is the plugin that finally forced me to stop using
hjkl and actually learn vim’s movement system. Even vim-hardtime, the ‘nicer’ plugin, wouldn’t cut it. After running in hardmode, I’ve been getting around using
F as replacements for
Their is even : https://github.com/kbarrette/mediummode
That actually seems like it would be more irritating than hard mode…
A good character wise movement plugin is com-seek:
It’s like f/F, but finds two characters, not one.
I don’t get this sort of thing at all. For me,
kmotions are used constantly, and I don’t know of any other commands that substitute well. I even set up
10k, respectively, because I often find
}not that useful. I don’t want a plugin to turn them off, because I’m not sure what they plan to replace them with.
Meanwhile, I very rarely use
l. I find them super-tedious to move more than a few chars at a time. I don’t see why anyone would use them over
b. I don’t need a plugin to convince me not to use them - I’m already convinced.
What do you do if you want to change something like
FooFooFooor similar middle-of-the-identifier edits where w/e don’t consider the terms distinct? I seen people recommend
f<letter>c<motion>but I’ve always thought counting letters to use with the f motion takes more time than leaning on h/l. Similar story for forward/backward search when your target is on the same line.
;' repeats the last f/F/t/T motion, and,’ does the same in the opposite direction. If I’m in a situation where counting would be necessary, it’s sometimes faster to spam
;' a few times, and if I accidentally pass it, use,’.
It’s not elegant, but it works well for those situations where you expect `fB’ to match but it doesn’t.
e.g. to s/FooBarFoo/FooBarQuux/, `fF;cwQuux’.
Usually there’s other motions that’ll work in context too, depending on what text surrounds it.
I would do
fBctFfor that. I find it easy because I’m already thinking about “I want to change Bar to Foo right up to the next Foo”, so the letters to to
tto come to mind easily. If I’m
ling, then I have to either try to count letters, which is distracting, or hold one down, probably overshoot and need to go back, which is also distracting. The whole thing I like about Vim is how, once you commit certain things to instinctive memory, you spend very few mental cycles thinking about how to make an edit you want to make or waiting to switch between mouse and keyboard.
It’s also cool that Vim is almost a completely different program for everyone who uses it and can fit many different mental models about how to edit text.
It depends how many characters you want to change. When it is just “Bar”, I’d probably use 3s.
Does this also break motions on verbs? Losing
d<N>jseems like a big loss if you use relative numbering.
I turned off relative numbering – as you point out, it’s not very useful if you don’t have
hjkl. With absolute numbering you can jump wherever using
d142Gworks just as well as
Bvery quick, often better then
Fbecause there’s no need to pick a letter to jump to.