News for hackers. Stuff that matters.
Re:Bill Joy's greatest gift to man – the vi editor (2003) by bdamm on Wednesday May 06, 2020 @01:43PM (#23094011)
vi also builds its concepts together in a great way. Navigation keys are powerful, but combined with actions, they become monumentally powerful in a way few IDEs seem to replicate well. Something simple like "copy the next 10 lines to the clipboard" is just 10yj or 10Y or even y10j. No awkward reaching for control keys. Now combine those actions into macros and things get really fun.

One of the most fun navigation keys is the under-reported "f" key. If the cursor isn't where you want it to be, you can easily put it on the right line (perhaps with 55G or something if you want line 55) and then to move the cursor over the character you are actually looking at you just type f( assuming that ( is the character you want the cursor on. It's just great... it's about having the computer work around your human experience of looking at the screen in a nice way.

Re:Bill Joy's greatest gift to man – the vi editor (2003) by u801e on Wednesday May 06, 2020 @11:32PM (#23099424)
> One of the most fun navigation keys is the under-reported "f" key. If the cursor isn't where you want it to be

There's also the t key which will place the cursor on the character just before it. There are also the F and T keys that will search backward in the same line and the ; and , keys that allow you jump from character to character in that line.

But, if you want more flexibility and the ability to jump across multiple lines, a / or ? search will allow you to select text up to and including the multiple characters you search for.

Re:Bill Joy's greatest gift to man – the vi editor (2003) by bdamm on Thursday May 07, 2020 @10:12AM (#23103164)
There are so many navigation keys and combinations, that's kind of what is great about it. A lifetime's worth, in the case of vim and neovim. I personally have got a lot of mileage out of f, F, t, T, /, ?, G, 0, W, w, e, E, b, B, }, and %.