r/ProgrammerHumor • • Apr 20 '15

vim

Post image
1.3k Upvotes

427 comments sorted by

View all comments

Show parent comments

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!

2

u/minno Apr 21 '15

I prefer :%s/foo/bar/gc so that I don't accidentally change a part of the file I didn't mean to.

1

u/pehnn_altura Apr 21 '15

Good point!