explaingit

preservim/nerdtree

Analysis updated 2026-06-21

20,074Vim ScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A Vim plugin that adds a file explorer sidebar to the Vim text editor, letting you browse and open project files from a visual folder tree instead of typing paths.

Mindmap

mindmap
  root((NERDTree))
    Core features
      File tree sidebar
      Expand collapse folders
      Open in split or tab
    Configuration
      Auto-open on start
      Custom keybindings
      vimrc integration
    Ecosystem
      Git status plugin
      Icons plugin
      Syntax coloring
    Install
      vim-plug
      Vundle Pathogen
      Vim 8 packages
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Browse and navigate a multi-file project inside Vim without leaving the editor to use a terminal file browser.

USE CASE 2

Open files in split windows or new tabs directly from the NERDTree sidebar while editing code.

USE CASE 3

Auto-open a file tree when Vim starts so your workspace always shows the current project structure.

USE CASE 4

Extend NERDTree with companion plugins to show Git status indicators and file type icons next to filenames.

What is it built with?

Vim ScriptVimNeovim

How does it compare?

preservim/nerdtreewsdjeg/spacevimtpope/vim-fugitive
Stars20,07420,27121,585
LanguageVim ScriptVim ScriptVim Script
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires a Vim plugin manager such as vim-plug, Vundle, or Vim 8 built-in packages, no external dependencies.

License information was not specified in the description.

In plain English

NERDTree is a file browser plugin for the Vim text editor. Vim is a terminal-based editor that normally doesn't show a graphical file tree, you open files by typing their path. NERDTree adds a sidebar panel to Vim that displays your project's folder structure as a navigable tree, letting you browse directories and open files by pointing at them rather than typing paths. Within the tree panel you can expand and collapse folders, open files in new tabs or split windows, and perform basic file management operations. Pressing ? in the NERDTree panel shows a quick reference of all available keyboard shortcuts. The plugin integrates with the rest of Vim so you can configure keyboard shortcuts in your Vim configuration file to toggle the tree, focus it, or jump it to the currently open file. NERDTree can be auto-configured to open when Vim starts, and it can be set to automatically close Vim when NERDTree is the last remaining window. It has an extension API, and a small ecosystem of companion plugins adds features like showing Git status indicators next to files, file type icons, syntax-based coloring, and multi-file operations. Installation follows the standard Vim plugin process using any popular Vim plugin manager (Pathogen, Vundle, vim-plug, Dein), or Vim 8's built-in package management by cloning the repository to a specific directory. You would use NERDTree if you use Vim and want a file explorer sidebar, particularly when working in a multi-file project. The plugin is written in Vim Script and works with both Vim and Neovim.

Copy-paste prompts

Prompt 1
Add NERDTree to my Vim setup using vim-plug. Show the vimrc config to toggle it with a keyboard shortcut and auto-open it when Vim starts on a directory.
Prompt 2
How do I configure NERDTree to automatically close when it is the last window remaining open in Vim?
Prompt 3
I use NERDTree with the nerdtree-git-plugin, show me how to set it up so staged, modified, and untracked files each get a different icon in the tree.
Prompt 4
What are the most useful NERDTree keyboard shortcuts for opening files in vertical splits, horizontal splits, and new tabs?
Prompt 5
How do I make NERDTree jump to the file I am currently editing so the tree stays in sync with my open buffer?

Frequently asked questions

What is nerdtree?

A Vim plugin that adds a file explorer sidebar to the Vim text editor, letting you browse and open project files from a visual folder tree instead of typing paths.

What language is nerdtree written in?

Mainly Vim Script. The stack also includes Vim Script, Vim, Neovim.

What license does nerdtree use?

License information was not specified in the description.

How hard is nerdtree to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is nerdtree for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub preservim on gitmyhub

Verify against the repo before relying on details.