Incremental search and replace in Vim

Because I rarely need it and forget it almost instantly, here’s how to incrementally search and replace text in Vim:

:%s/old/new/c

For each occurrence of old you’ll get asked whether to replace it with new and you can individually accept (y) or reject (n) the replacement.

Über Stefan

Polyglot Clean Code Developer

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert