<C-space> 在 Windows 终端的 PowerShell 中的 neovim 中不起作用

And*_* O. 7 powershell vim-plugin neovim windows-terminal

每个人!

\n

我\xe2\x80\x99m为\xe2\x80\x9cWindows终端\xe2\x80\x9d配置neovim。我安装了 coc 插件。我想用它来触发建议,就像在 VSC 中一样。但问题是在 neovim 中根本不起作用。

\n

这是我尝试使用的重新映射:

\n
" Use <c-space> to trigger completion.\nif has(\'nvim\')\n    inoremap <silent><expr> <c-space> coc#refresh()\nelse\n    inoremap <silent><expr> <c-@> coc#refresh()\nendif\n
Run Code Online (Sandbox Code Playgroud)\n

我试过:

\n
inoremap <silent><expr> <Nul> coc#refresh()\ninoremap <silent><expr> <c-@> coc#refresh()\n
Run Code Online (Sandbox Code Playgroud)\n

而且它们也不\xe2\x80\x99 工作。

\n

我还尝试检查是否适用于其他重新映射:

\n
inoremap <c-@> print<cr>\ninoremap <c-space> print<cr>\ninoremap <Nul> print<cr>\n
Run Code Online (Sandbox Code Playgroud)\n

即使直接使用 powershell、命令提示符、bash 和 cmder 终端,它也不会\xe2\x80\x99t 键入 \xe2\x80\x9cprint\xe2\x80\x9d 文本。

\n

顺便说一句,ctrl+space 可以直接在 \xe2\x80\x9cwindows 终端\xe2\x80\x9d 和 PowerShell 中作为自动完成功能使用。有人可以告诉我,这是 neovim 还是终端问题?

\n

以前有人解决过这个问题吗?

\n

我在发布之前发现了互联网,我发现的唯一的就是这篇 2 年前的文章,它没有 \xe2\x80\x99t 帮助。

\n

小智 0

不确定“Windows 和 Powershell”,但 ctrl+y 对我有用。我让自己变得更容易,只是重新映射了 ctrl+y。`inoremap