Back to Ideavim

NERDTree

doc/NERDTree-support.md

2.34.03.7 KB
Original Source

NERDTree

IdeaVim supports the NERDTree plugin. Update your ~/.ideavimrc to turn it on:

vim
Plug 'preservim/nerdtree'

or

vim
set NERDTree

Use set noNERDTree to disable this extension.

<details> <summary>Full list of aliases</summary>
vim
set NERDTree
Plug 'preservim/nerdtree'
Plug 'https://github.com/preservim/nerdtree'
Plug 'https://github.com/scrooloose/nerdtree'
Plug 'scrooloose/nerdtree'
Plug 'nerdtree'
</details>

Preview

<details> <summary>Click for the preview</summary> </details>

Supported commands

  • :NERDTree
  • :NERDTreeFocus
  • :NERDTreeToggle
  • :NERDTreeClose
  • :NERDTreeFind
  • :NERDTreeRefreshRoot
KeyDescriptionMap Setting
oOpen files, directories and bookmarksg:NERDTreeMapActivateNode
goOpen selected file, but leave cursor in the NERDTreeg:NERDTreeMapPreview
tOpen selected node/bookmark in a new tabg:NERDTreeMapOpenInTab
TSame as 't' but keep the focus on the current tabg:NERDTreeMapOpenInTabSilent
iOpen selected file in a split windowg:NERDTreeMapOpenSplit
giSame as i, but leave the cursor on the NERDTreeg:NERDTreeMapPreviewSplit
sOpen selected file in a new vsplitg:NERDTreeMapOpenVSplit
gsSame as s, but leave the cursor on the NERDTreeg:NERDTreeMapPreviewVSplit
ORecursively open the selected directoryg:NERDTreeMapOpenRecursively
xClose the current nodes parentg:NERDTreeMapCloseDir
XRecursively close all children of the current nodeg:NERDTreeMapCloseChildren
PJump to the root nodeg:NERDTreeMapJumpRoot
pJump to current nodes parentg:NERDTreeMapJumpParent
KJump up inside directories at the current tree depthg:NERDTreeMapJumpFirstChild
JJump down inside directories at the current tree depthg:NERDTreeMapJumpLastChild
<C-J>Jump down to next sibling of the current directoryg:NERDTreeMapJumpNextSibling
<C-K>Jump up to previous sibling of the current directoryg:NERDTreeMapJumpPrevSibling
rRecursively refresh the current directoryg:NERDTreeMapRefresh
RRecursively refresh the current rootg:NERDTreeMapRefreshRoot
mDisplay the NERDTree menug:NERDTreeMapMenu
qClose the NERDTree windowg:NERDTreeMapQuit
AZoom (maximize/minimize) the NERDTree windowg:NERDTreeMapToggleZoom
dDelete file or directoryg:NERDTreeMapDelete
nCreate Fileg:NERDTreeMapNewFile
NCreate Directoryg:NERDTreeMapNewDir

Troubleshooting

If you see the the file is opened automatically on every movement in the Project View (j, k, etc.) please make sure that you have "Open Files with Single click" disabled.