【发布时间】:2021-05-03 22:29:28
【问题描述】:
我正在尝试将自动完成键从“Enter”键重新映射到“TAB”,因为当我打算转到下一行时,我一直在自动完成。下面的代码是 coc 的默认选项,我认为这是我应该能够重新映射密钥的地方。
" make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<c-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
我认为将开头的
//normal behavior
someFunction(){
//cursor here appropriately indented
}
//behavior after I made the changes mentioned above
someFunction(){
//cursor here}
我假设我根本不了解 coc 或在 VIM 中重新映射键。
为什么我不能简单地将
【问题讨论】:
-
我不知道这是否有帮助,但这是我的 vimrc 中专门用于 coc 完成的部分:codesandbox.io/s/falling-butterfly-yejn1?file=/init.vim