0
我想寄存器包含反斜槓,但是當我嘗試將它們移除時。實施例(爲
「first_name的姓氏」 → 「姓氏,名字」 與根據正則表達式模式的所有行的文件:/^[^ \n]+ [^ \n]+$/gm
):Vim:設置包含反斜槓的寄存器
- 設置寄存器1與設:
:let @1="%s/\(.*\) \(.*\)/\2, \1/g"
- 顯示寄存器1(在當前行插入):
:put 1
- 插入:
"%s/(.*) (.*)/^B, ^A/g"
我希望該寄存器包含反斜槓以便it can be executes as a command in command mode。