Skip to Content

vim

In Vim search and replace, you need to escape special regex characters in the search pattern (like []), but not in the replacement text. So, to replace all [] with [ ], you would use the command :%s/\[\]/[ ]/g.

Last updated on
Do not shoot this.