[英]vim using leader together with <C-?>
I found this snippet from unite.vim 我从unite.vim找到了这个片段
nnoremap <leader>t :<C-r>Unite -no-split -buffer-name=files -start-insert file_rec<cr>
It seems it try to map "\\t" to "Unite -no-split -buffer-name=files -start-insert file_rec" 似乎它尝试将“ \\ t”映射到“ Unite -no-split -buffer-name = files -start-insert file_rec”
what does <Cr>
mean here ? <Cr>
在这里是什么意思? what is the difference from the following: 与以下内容有何区别:
nnoremap <leader>t :Unite -no-split -buffer-name=files -start-insert file_rec<cr>
In Ex mode, Ctrl + R (written <Cr>
in Vim) will insert the content of the specified register on the Ex command line. 在Ex模式下, Ctrl + R (在Vim中写为
<Cr>
)将在Ex命令行上插入指定寄存器的内容。 <Cr>U
will insert the content of the U
register. <Cr>U
将插入U
寄存器的内容。 All commands starting with :
are Ex mode commands. 以
:
开头的所有命令均为Ex模式命令。
To see this in action, do the following: 要查看实际效果,请执行以下操作:
"adw
. This means "delete a word to register a
". "adw
,这意味着‘删除一个字注册a
’。 :<Cr>a
. :<Cr>a
。 Your Ex mode command line will now contain the word. I have looked at the relevant .vimrc
and the unite.vim
source, and I doubt the <Cr>
is supposed to be there. 我已经看过相关的
.vimrc
和unite.vim
源代码,并且我怀疑<Cr>
是否应该存在。 It is most likely a bug or a typo. 它很可能是错误或错字。
For more information, see :help c_CTRL-R
. 有关更多信息,请参见
:help c_CTRL-R
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.