Hacker News new | ask | show | jobs
by ajfapoiawejf 1958 days ago
The difference for me was realizing that Shift-V % will typically highlight precisely what I want - though that's a bad example, visual mode is rare for me. More frequently it's something like `dap`, which works with a level of precision across lines that aren't necessarily all on screen. If I click and drag, I'm liable to select one extra or one less line, e.g.
1 comments

Is this better than using the keyboard with arrow keys and ctrl/alt/shift?
I could never remember what the ctrl/alt/shift modifiers do and never managed to get fluent with them - they also require repeating movement many times by holding/tapping the arrow keys until you get to where you want to go, so it feels imprecise to me. I've seen plenty of people who are much better with the arrow keys than I am so I know it's possible to do very well with it though.

`dap` was simpler for me and is easily repeatable with `.` in vim.

Either way, you're not touching the mouse.

Well, vi already allows considerably more than 4×4 different references to text objects relative to the cursor, and vim adds some others on top of those.

I guess if you include chords of modifier keys, you could have 2⁴×4 possibilities, which would be extremely competitive with vim in this regard, although I haven't encountered an editing environment that did that. (That's not to say that it couldn't exist.)

I consider myself a proficient but unsophisticated vi user, and I seem to have at least 19 cursor movements that can be combined with selection or deletion in my muscle memory, in the sense that I would regularly use them without being consciously aware of how I chose one movement command rather than another. And that's not counting the ability to prefix them with repetition counts, which is usually a more conscious activity for me. I know that vim provides another dozen or more that I've never learned well, but it seems like other people have.

It does take time to internalize these, which is one reason we see so many people making "learn vim" games and tutorials. And I could imagine that they might not be the exact selection of movements that someone would find optimal, let alone easy to remember or articulate.