Hacker News new | ask | show | jobs
by scotty79 1213 days ago
Ctrl+G + line number

Ctrl+F + what you are looking for

PgUp PgDown plus visual scan

Home, End, arrows (plus potentially control) for pinpointing the exact spot. Shift for block marking.

Ctrl+C (or X), Ctrl+V for moving stuff around.

No reason to touch mouse or learn cryptic shortcuts.

2 comments

Only after learning vim you realize how clumsy and slow this is.
I used vim for 5 years, afterwards I switched over to Emacs, and I couldn't disagree with you more. What's clumsy and slow is having to switch between insert mode, normal mode, and visual mode hundreds of times while working rather than just using modifier keys for special actions.
If you're entering normal mode for one or two commands at a time, that could be problem. However, if you're fast at entering normal (i.e. use jj, fd, Caps Lock as Esc, etc.), that's not a meaningful overhead.

On the other hand, having to constantly hold Control/Alt, including long chords (e.g. with prefix + count), feels much worse for me. I use Emacs keybinds on the terminal (outside of vim), but I can't imagine having to constantly press modifiers. It's not as comfortable as switching to a mode where those actions are explictly first-class.

The difference in manipulating text in emacs vs vscode is day and night though.
vim equivalents:

20g line number

/ find what you are looking for

same for pgup and pgdown

i think what you're describing sounds a bit like visual mode which is just v

d and p for cut and paste if moving stuff around needs to be done (dd for whole line, 5dd for 5 lines, v and then j a few times in visual mode before d or y for yank (copy), etc...)

Note how you don't have to strain your pinky to hit ctrl for any of these?

> Note how you don't have to strain your pinky to hit ctrl for any of these?

Note how insanely context-dependent all these are? How it's completely different commands for what is essentially the same operation?

Keys can be remapped (I have CapsLock mapped to Ctrl).

Yeah I got mine remapped to esc

It's just a different modality mine just exists a little closer to where my fingertips chill on the home row