Vim: interactively check what happens before replacing?

vim has very powerful command tools. I can replace Array's "Set for all":

 :%s/Array/Set/g 

But can I do this interactively as Unix commands (like rm )? I hope vim asks me if I really want to replace the word, and not replace them all at once.

+4
source share
1 answer

Yes, you can do this by adding another command:

 :%s/Array/Set/gc 
+8
source

Source: https://habr.com/ru/post/1410952/


All Articles