在 .vimrc 中的键映射后放置注释后 Vim 中的警报声音

Alert sound in Vim after placing comments after key mapping in .vimrc

我正在尝试映射以下键以切换 Vim 中的拆分。

nnoremap <s-j> <c-w>j  " Shift + j to switch the split below
nnoremap <s-k> <c-w>k  " Shift + k to switch the split above
nnoremap <s-h> <c-w>h  " Shift + h to switch the split on the left
nnoremap <s-l> <c-w>l  " Shift + l to switch the split on the right

除了我在执行切换时听到提示音外,效果很好。比如按Ctrl+w再按j没有提示音,但是按Shift+j.

有提示音

我怀疑是哪里出错了,不喜欢不理解就关掉提示​​音

也许重新映射不仅仅是 Ctrl+w + j

有vim专家有什么想法吗?

删除您的评论可能会解决此问题。参见 :help :quote

还有……

  • 当您可以简单地使用 J 时,为什么 <s-j>
  • :help J:help L:help H:help K都是非常有用的命令。您确定要覆盖它们吗?