VIM怎么获取搜索的字?
我的"字word"很长,按住*或者#号时,会向前/后搜索它,此时"字word"会高亮起来。我想替换它
:% substitute /字word/Other/g
因为"字word"很长,硬输入比较耗时,又不能用Tab间补全,有什么办法能提取它么? 复制粘贴行么 这种情况下,赋值+粘贴要用鼠标选中,然后 + ,速度比直接输入慢的。 用英文:vim substitute last search word在google上找到了。
只需要: % substitute //Other/g
或者: % substitute /<C-R>/时上次搜索的"字word"会呈现出来。也就是按Ctrl+R键后按/键。
参考:http://vim.wikia.com/wiki/Substitute_last_search 回复 4# 123456XP
顶,又学一招
shift+insert 没用过么
页:
[1]