explaingit

preservim/nerdtree

20,076Vim ScriptAudience · developerComplexity · 2/5QuietLicenseSetup · easy

TLDR

A file browser sidebar for Vim that displays your project's folder structure as a navigable tree, letting you browse and open files without typing paths.

Mindmap

mindmap
  root((NERDTree))
    What it does
      File tree sidebar
      Browse directories
      Open files visually
    Key features
      Expand collapse folders
      Split windows tabs
      Git status indicators
    How to use
      Keyboard shortcuts
      Toggle with config
      Auto-open on start
    Tech stack
      Vim Script
      Vim Neovim
    Use cases
      Multi-file projects
      Quick file navigation
      File management

Things people build with this

USE CASE 1

Browse and open files in multi-file projects without typing paths.

USE CASE 2

View Git status indicators next to files to see which ones have changed.

USE CASE 3

Organize file operations like renaming, copying, and deleting from within Vim.

USE CASE 4

Toggle a file tree sidebar on and off while editing to keep your workspace clean.

Tech stack

Vim ScriptVimNeovim

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

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
How do I install NERDTree in Vim using vim-plug?
Prompt 2
Show me how to set up NERDTree to auto-open when Vim starts and auto-close when it's the last window.
Prompt 3
What keyboard shortcuts does NERDTree use to expand folders, open files in splits, and navigate the tree?
Prompt 4
How do I add Git status indicators to NERDTree to see which files have uncommitted changes?
Prompt 5
Can I customize NERDTree's appearance with file type icons and syntax coloring?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.