83

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
[-] Duke_Nukem_1990@feddit.org 17 points 4 months ago

I am logged into various servers via ssh constantly and nano or vim (or at least vi) are installed pretty much by default everywhere.

[-] ICastFist@programming.dev 6 points 4 months ago

That doesn't explain a preference for vi(m) over nano, tho

[-] stembolts@programming.dev 4 points 4 months ago* (last edited 4 months ago)

How could I live without dd, vap, 99j, 99k, 555gg, zt, zz, zb, [, ]?

If these were the only vim commands it would still be better than Nano.

[-] grrgyle@slrpnk.net 2 points 4 months ago

For me it's plain ol' tT and fF. I get frightfully bored when a text field makes me use Home/End/arrows ๐Ÿ˜ช

It's like, I know where I want the cursor, just let me GO there. And no manually moving my cursor into position is not it. It's so not it

[-] stembolts@programming.dev 2 points 4 months ago* (last edited 4 months ago)

I don't know this command, about to test it out.

I always use 0 and $, then W and B to leapfrog words manually ๐Ÿ’€

Thanks!

[-] grrgyle@slrpnk.net 2 points 4 months ago

Welcome! I also stumbled upon these after I'd been using vim for a while. You've probably seen them in guides but glossed over them like I did originally. But once you get used to using these keys, you'll wonder how you lived without them!

Used in combos like f(dib (delete function parameters), or 2t. (go back two periods, or sentences) they're so great for moving within a long row.

[-] zagaberoo@beehaw.org 1 points 4 months ago

Nano is extremely basic, it's not really the right comparison. Vi competes well with heavyweight GUI editors and IDEs, yet is available about as ubiquitously as nano.

By learning vi, I can have my no-compromises favorite editor equally available to me locally or remotely. The terse, low-chord (looking at you, nano) editing language in vi means I'm not even that hampered when I do remote editing from my phone.

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

Ask Experienced Devs

0 readers
1 users here now

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

founded 1 year ago