this post was submitted on 17 Jul 2024
82 points (97.7% liked)

Ask Experienced Devs

1230 readers
1 users here now

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

I'd like actual examples instead of "I work faster", something like "I can move straight to the middle of the file with 7mv" or "I can keep 4 different text snippets in memory and paste each with a number+pt, like 2pt", things that you actually use somewhat frequently instead of what you can do, but probably only did once.

you are viewing a single comment's thread
view the rest of the comments
[–] ExperimentalGuy@programming.dev 8 points 1 month ago (9 children)

I use vim bindings in vscode, but I'm trying to switch to neovim.

It's hard to talk about efficiencies without use cases but here's some that I like:

  • Compared to using mouse, text selection is just much easier in vim. Instead of accidentally highlighting an extra space and clicking somewhere on accident which gets rid of my selection, vim lets me go directly to the end of the word and be precise about where I'm selecting.
  • I remember before I used vim, I would count the number of times I hit the backspace or delete when I had heavily nested parentheses. With vim I just type the exact number I want, and if I were to undo that operation I also know exactly what was changed, whereas when counting there's always the possibility of miscounting or pressing delete without counting.
  • I don't have to scroll. I can jump 100 lines in less than a second. Instead of searching through long files to find where I left off, I just generally remember what line number I was at, then I can simply just jump back.
  • Forces me to type better. Before vim I had really shitty typing form(I don't know what it's actually called) but switching to vim shone a light on exactly how I was typing wrong, and now I type faster.
  • Using the % operator you can jump between brackets or parentheses. This comes in handy especially when you want to highlight the inside of a function call, or just jump to the end of a pair of brackets
[–] FizzyOrange@programming.dev 0 points 1 month ago (7 children)
  1. Ctrl-left/right jump to the beginning/end of words
  2. No exactly sure what you mean here.
  3. Page up/down let you scroll up/down quickly. Ctrl-P :123 lets you jump to a specific line, but I generally use editing history (alt-left) instead.
  4. I can type perfectly well...
  5. Ctrl-{ or } does this I think.

Do you have any more compelling examples?

[–] ExperimentalGuy@programming.dev 1 points 1 month ago

Nah I don't have any more examples cuz I haven't been using vim for like 30 years. I think the other comments make good points tho

load more comments (6 replies)
load more comments (7 replies)