what does ^A stand for in vim

Tag: vim Author: q183219449 Date: 2009-08-03

I need to replace ^A, ^B in a file, the following command is useless :s/^A/

Best Answer

To get the ^A character, press CTRL-V CTRL-A

If you have configured the "paste" action with CTRL-V (generally on Windows) you can use CTRL-Q instead of it.

Other Answer1

You need to escape the ^ with a \, i.e. s/\^A/^B/. ^ denotes "start of line" in a regular expression. In the replacement text, escaping is not necessary, but possible.