[英]How to get VIM to enter normal mode after Command + V paste in insert mode?
The workflow Id like is as follows工作流程Id如下
Command + V
我使用Command + V
粘贴Currently I remain in insert mode afterwards目前我之后仍处于插入模式
It's not recommended that you use cmd+v for pasting but here is the solution.不建议您使用 cmd+v 进行粘贴,但这是解决方案。 Remap your key like this and your register to whatever you use.像这样将您的密钥和您的寄存器重新映射到您使用的任何内容。 Position your cursor however you want in the function. Position 你的 cursor 但是你想在 function 中。
function! LeaveInsert() abort
exe "normal! ".'"'."+p "
call feedkeys("\<Esc>")
endfunction
inoremap <c-v> <Cmd> :call LeaveInsert()<cr>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.