Comment by BrouteMinou

1 day ago

I always find it funny when people say to not repeat h-l, w-W keys for horizontal movement.

No way I am starting to count how many characters there are in front of my cursor just to have the satisfaction of typing "31-l"...

I am totally going to spam some 2w 3w llll until I reach the desired position.

I think it's more about getting used to f-F,t-T,A,I, and <semicolon> which can be quicker especially with code. You can also add easymotion or similar plugins for the powered version of those.

That's the point of this plugin - holding "wwwwwwww..." is a bad habit, because it's very likely there is an objectively better way of getting there. Not necessarily "142l" but "/<piece of word><ENTER>" or "f,;;".

At first I had to count characters. Over time, it becomes intuitive. In the same way that if someone holds up three fingers you don't count "one, two, three", you immediately perceive that they are holding up three fingers.

For numbers under 10, I usually hit the right amount. For numbers around 30, I might be off by one to five, but move on from then. When I want to remove similar prefixes from multiple non-consecutive lines, I might use things like 31x, go to the next instance (maybe continuing a search with n), and press period.

Honestly though, if you're moving forward 31 characters, there's often an easier approach, like 4w (move forward three Words). Again, at first I had to consciously think about which combination to use. Over time it becomes second nature.

I still use jjjj sometimes. It's imperfect, but at least it's the human that's the limiting factor, and not the software.

  • A big help for me is H/M/L - mnemonic high/middle/low.

    Moves to the top/bottom/middle of the viewport, and the. I'll jjjj/kkkk away! (or probably just search, mostly).

There was a guide that mentioned "scrabble tile" movement. `fj` is quicker than `fe` because J is way less common than E.

Once you get "near", then zeroing in on your target (eg: `fj`, `Fa` for "adjacent") can be the fastest/most accurate way to get to where you want to go.

>No way I am starting to count how many characters there are

You don't have to. There are many ways to do a jump without counting. Some of the require plugins like flash.nvim, some do require pressing `;` multiple times

Do you even `%` to navigate to matching ()[]{}? Often useful to jump straight to function end from signature, lispy paran-nests, and so on.