Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好的,这是我到目前为止编写的脚本:
function MkCheck() put = \"✓\" endfunction
它工作正常,但它自己在一行上插入复选标记。我想将它插入光标当前所在的位置。有没有办法put将字符放在光标之前(或之后)?
put
您可以进入insert模式,附加字符并返回normal模式:
insert
normal
function MkCheck() execute "normal! i✓\<ESC>" endfunction