如何禁用与自定义映射冲突的 NERDTree 映射?

How to disable a NERDTree mapping that conflicts with a custom mapping?

我目前在我的 .vimrc 中有这个映射,使 windows 之间的导航更容易。

nnoremap <c-j> <c-w>j

我注意到在安装 NERDTree 并使用 e . 在当前缓冲区中打开它之后,我无法再使用 c-j 向下移动到 window 下面。我查看了 NERDTree 文档并找到了这个映射

<C-J>...Jump down to the next sibling of the current directory...|NERDTree-C-J|

我并没有真正看到自己使用这个映射,所以我怎么能禁用它并返回 <c-j><c-w>j

根据 NERDTree documentation(第 *NERDTree-C-J* 节),此映射称为 NERDTreeMapJumpNextSibling

在这种情况下,您应该将其设置为其他值,这样插件就不会重新映射它。

在您的 .vimrc 中执行此操作:

let g:NERDTreeMapJumpNextSibling = ''