有没有简单/快捷方式“抽出”到Vim的“最后一次搜索”寄存器(“/) 从VIM文档,看来答案是否定的,但它可以通过一个“让”命令分配: It is writable with ":let", you can change it to have 'hlsearch' highlight
other matches without actually searching. You can't yank
我已阅读其他帖子,例如vim: Executing a list of editor commands等。对于我来说,答案并不明确。我有一些从SQL查询中生成的编辑器命令。它使用:s/foo/bar来更改国家代码(从FIPS到非标准代码集)。下面是该文件的一个示例: :s/CB/CAMBO
:s/CQ/NMARI
:s/KV/KOSOV
:s/PP/PAPUA
...
我已经保存在一个
set nohlsearch
set ai
set bg=dark
set showmatch
highlight SpecialKey ctermfg=DarkGray
set listchars=tab:>-,trail:~
set list
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,