r/ProgrammerHumor • • Apr 20 '15

vim

Post image
1.3k Upvotes

427 comments sorted by

View all comments

102

u/[deleted] Apr 20 '15

And many more hours trying to figure out how to use it in the first place. (For context, written by an occasional vim user).

38

u/ngildea Apr 20 '15

Maybe if you used if more than occasionally you wouldn't be so confused! :P

45

u/Neekoy Apr 20 '15 edited Sep 08 '26

Marvelous coordinated pause smile cough blanket

This post was anonymized with Redact

3

u/pehnn_altura Apr 21 '15

:%s/foo/bar/g

Find and replace all instances of foo with bar. Great shortcut if you need to rename a variable!

0

u/[deleted] Apr 21 '15

[deleted]

1

u/Sean1708 Apr 21 '15

What of you mean by a proper structural scan?

2

u/minno Apr 21 '15

Instead of replacing every instance of an "f" followed by an "o" and then another "o", it finds the declaration of the variable you ask it to rename and finds every use point of that variable, so other variables or program fragments that match the same string don't get replaced.

1

u/Sean1708 Apr 21 '15

Ah ok like a scope-aware rename? That sounds like it would be impossible to do language agnostically.

→ More replies (2)