this post was submitted on 17 Jul 2024
81 points (97.6% liked)

Ask Experienced Devs

1064 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
[–] [email protected] 6 points 4 months ago (2 children)

Bouncing on parentheses with % makes structured files easy to get around in.

That's something I wasn't aware you could do in vim. % jumps to the next parentheses character, whether ( or )? Does it work with brackets and curly braces too?

[–] [email protected] 6 points 4 months ago

So far as I'm aware, yes. As a C engineer, it's also useful for jumping from #ifdef to #endif .

[–] [email protected] 2 points 4 months ago

It generally works with a wide variety of delimiters. There's a widely used plugin to make it work with even more, including language-specific keyword pairs.