Questions tagged [plugin-nerdtree]

For questions about the plugin nerdtree: A tree explorer plugin for Vim.

Filter by
Sorted by
Tagged with
48 votes
6 answers
85k views

How do I open and close NERDTree (toggle NERDTree view) using a single keystroke?

Sometimes in my workflow, I might want to open or search for a file on the go. I'd like to map a single key (say F6) to open and close NERDTree (i.e., I want to toggle the NERDTree view). Also, I'd ...
evil_potato's user avatar
27 votes
1 answer
33k views

How to install NERDTree with Vundle?

I'm starting to use Vim and I chose Vundle instead of Pathogen. I would like to know if I can install the NERDTree using Vundle. I'm starting Vim and searching for NERDTree like this: :BundleSearch ...
João Calvin's user avatar
23 votes
2 answers
22k views

How do I change the default size of plugin window (NerdTree, Taglist, etc)?

I'm using the Taglist and NerdTree plugins quite often. Usually the window that opens in the left side is too small and I need to extend it. I usually do: 10 CTRL+w > Is there a way to change the ...
stdcall's user avatar
  • 939
11 votes
1 answer
4k views

NERDTree How to open a file and automatically close the explorer buffer

When using NERDTree plugin the default behavior is to open a new file and keeping the NERDTree buffer open. What I want to do is to keep this default behavior but also overriding it when I want so the ...
statox's user avatar
  • 49k
10 votes
5 answers
2k views

Stop CtrlP from opening in NERDTree

I use both CtrlP and NERDTree in my Vim. When I open a file using the CtrlP search feature, it sometimes opens in the NERDTree window (and always if the NERD window is the active one). How can I stop ...
Sheharyar's user avatar
  • 751
9 votes
3 answers
7k views

Summary of functions in current file?

While working in various source files, (C, Ruby, etc.) I find that I'm often hunting around for functions. Is there a way to have an auto-generated HUD that lists the structure of the current file? It ...
Sauce McBoss's user avatar
9 votes
5 answers
17k views

How to set up NERDTree to CD to current folder when opening it for the first time via :NERDTreeFind

Given: $ cd ~/Sites/project project $ vim :NERDTreeFind I would like to see NERDTree opening with ~/Sites/project as a root folder. Instead I see ~/Sites with project folder selected. So I have to ...
firedev's user avatar
  • 2,362
6 votes
3 answers
4k views

Prevent NERDTree from switching tabs when opening a file node?

In NERDTree, if I select a file node and hit o, it opens the file in a window in the current tab. However, if that particular file is already open in another tab, NERDTree switches to that tab. I find ...
Morton Fox's user avatar
6 votes
1 answer
738 views

Start NERDTree when gVim starts empty

I'd like to have NERDTree shown everytime I start gvim empty, that is without passing any argument to it, starting simply to load files rather than to create a new one, such as just by issuing gvim (...
user avatar
6 votes
3 answers
5k views

make nerdtree buffer consistent

I like how nerdtree looks as a side-drawer. but if I close current buffer using :bd nerdtree will become a fullscreen buffer and all new buffers will simply take full screen, nerdtree won't toggle ...
user avatar
6 votes
0 answers
3k views

Collapse all directories in NerdTree by default

I recently restored my computer to a clean install and copied over my dot files. MacVim behaves quite a bit differently than my previous install. One main thing is that NerdTree no longer collapses ...
Chad Fawcett's user avatar
5 votes
2 answers
6k views

Refresh files in NERDTree?

How do I refresh file tree in NERDTree ? If I use: :!touch SomeNewFile It is not rendered in the tree.
bhathiya-perera's user avatar
5 votes
1 answer
2k views

Why `NERDTree` doesn't trigger the autocommand `BufEnter`?

I am writing a vimscript function which should keep in a consistent state a "home made buffer manager". The idea is that I want to keep a trace of my buffers in the tabs they were open in. This "...
statox's user avatar
  • 49k
5 votes
2 answers
763 views

NERDTree on Vim

I'm running into a problem that I've never really ran into before with my setup. I've set up my NERDTree config in the .vimrc so that every time that I open a directory NERDTree will also open but it ...
Van-Sama's user avatar
  • 151
5 votes
1 answer
601 views

Problems with paths that includes swedish characters

Update I've now also tried this on my Arch setup and everything works fine there. vim --version on that machine says: VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 28 2015 08:49:36) Included ...
Oskar Persson's user avatar
4 votes
3 answers
3k views

navigate within nerdtree

I wonder how folks navigate efficiently with in a nerdtree window, for example if I'm in a folder like this: ├── m1.py ├── m1.pyc ├── m2.py ├── m2.py.bak ├── m2.pyc ├── main.py ├── matplotdemo.py ├── ...
timfeirg's user avatar
  • 141
4 votes
2 answers
975 views

Close all windows except the current one and NERDTree

I know about :only and Ctrl+wo. But I want to keep NERDTree window untouched. Is there a way to achieve it?
hiqsol's user avatar
  • 43
4 votes
1 answer
1k views

sourcing .vimrc file put square brackets around file icons

Whenever I try to source ~/.vimrc file when NERDTree is open, I get square brackets around the file icons like so: Is there a way to get rid of them? Is it a bug? I have already posted this question ...
Tri Nguyen's user avatar
3 votes
2 answers
1k views

How to execute xdg-open from NERDTree in Linux?

Netrw able to execute file with xdg-open by pressing x, how about NERDTree ? [Response to downvote] If xdg-open can so easy/direct to work (which is the reason of downvote), then what's the point ...
林果皞's user avatar
  • 237
3 votes
2 answers
3k views

Disable Lightline on Nerdtree

I would like to disable or hide Lightline (i.e. vim's statusline) when my cursor is in Nerdtree, while keeping it activated for other buffers. Here is what I mean: How can I achieve this? ...
vittorio's user avatar
3 votes
2 answers
2k views

A side pane file explorer that can list files by modification dates?

I am looking for a way to be able to open a side pane listing the files in the current directories where the listing is sorted by modification dates. I want to be able to open the files from the ...
Y. Pei's user avatar
  • 243
3 votes
1 answer
3k views

Nerdtree going to specific directory

Is it possible to go to a typed-in directory in Nerdtree (when already in it)? The below seems so common to do: $ cd ~/my/directory/here And with my current understanding of NerdTree it requires me ...
David542's user avatar
  • 2,335
3 votes
3 answers
854 views

Easily add/open a file in the same folder as the current file/buffer

I feel my current VIM setup is pretty sweet, but there is one thing that annoys me time and time again: how can I open a file or add a file to the same directory as the current file I am editing? If ...
oligofren's user avatar
  • 1,033
3 votes
1 answer
840 views

Execute a file from nerdTree

With the default file explorer (netrw) you can press x to open a file or directory with the system default application. Is there an easy way I can do the same with nerdTree? I can't find the option. ...
Wylex's user avatar
  • 543
3 votes
1 answer
2k views

NERDTreeMenu Remapping

I'm a Colemak keyboard layout user and I recently started to learn and use Vim. I was able to map the arrow keys in the normal mode by putting custom mappings such as noremap u k in .vimrc (because ...
David's user avatar
  • 143
3 votes
1 answer
1k views

How to show all LaTeX code but still have set conceallevel=3 for vim-devicons and NERDTree?

How can I adjust my .vimrc so that set conceallevel=0 is specific to just LaTeX documents? The plugin vim-devicons requires the following conceal level with NERDTree: set conceallevel=3 However, ...
Incalculon's user avatar
3 votes
2 answers
1k views

How to setup vim for working in a very large directory?

I am trying to setup my development environment using vim and some plugins. My workspace root is a directory with very large number of sub-directories and files. I am going to be working on files ...
Punit Soni's user avatar
3 votes
2 answers
10k views

NERDTreeTabs error message: E492: Not an editor command

I am using macvim Version 8.0.1098 (137) MacOS Sierra 10.12.6. I downloaded NerdTree tabs from here. I am using pathogen to manage my plugins. All the plugins work except this one. This is the error ...
Rajeshwar's user avatar
  • 379
3 votes
1 answer
2k views

How to use NerdTree to automatic focus on the current opened file position when toggle it on?

When use vim with nerdtree, I opened a file in a project. Press <Leader> key to trigger NERDTreeToggle. On the left side it will list the whole project directory by default. I want to let it ...
Miantian's user avatar
  • 133
3 votes
1 answer
183 views

Edit NERDTree text using normal mode vim keybindings

When using the "Add Childnode", "Move Node", "Copy Node", etc. options through the "m" menu, it opens up a text field to type in the name of the destination file. Unfortunately, I cannot figure out ...
Max Coplan's user avatar
3 votes
2 answers
243 views

Prevent buffer loads within NERDTree

If I have many buffers opened and, if the cursor (focus) is within NERDTree, when I change the buffer with :bn or :bp, the content of buffer loads within NERDTree. There's a way to, before buffer ...
Diego Somar's user avatar
2 votes
3 answers
1k views

Unable to Open NERDTree

I'm new to Vim, and for the paste couple of weeks, I've been using NERDTree with no problems. However, I recently added a few key mappings and am now unable to open NERDTree with the <C-n> ...
Mohideen Imran Khan's user avatar
2 votes
1 answer
8k views

how to split panes (vertically and horizontally) straight from nerdree

This question is a follow up to this one (graphs copied from there). The OP was wondering how to split the pane of File 3 horizontally. /========================================================\ | ...
abbood's user avatar
  • 643
2 votes
2 answers
1k views

Why does my lightline status line not show up right away?

Currently when I open a file (NerdTree appears automatically as well), the light line status line plugin I installed does not show up right away. It only shows up after I switch tabs into NerdTree and ...
Abdullah Hadi's user avatar
2 votes
1 answer
308 views

NerdTree cd vs CD

I'm not quite sure of the difference between cd and CD in NERDTree. It seems to actually cd into a directory I have to do cdCD, so for me they are kind of mushed together. From the docs it says: CD --...
David542's user avatar
  • 2,335
2 votes
3 answers
7k views

Can I open a file in a new tab with ctrl + return in NERDTree?

In my current environment, I open a file with return key in NERDTree, but sometimes I want to open it in a new tab. That being said, there is still more case where I want to open a file in the current ...
Blaszard's user avatar
  • 535
2 votes
1 answer
918 views

How can I close all NERTree buffers

When inside a session, I often end up with multiple tabs containing multiple split buffers and multiple "instances" of NerdTree buffers. Is there a command to close all NerdTree buffers in the ...
Running Turtle's user avatar
2 votes
1 answer
507 views

Prevent nerdtree from rebinding <cr>

I use <bs> for scrolling up half a page and <cr> for scrolling down: I'd like the same keybindings to be available in NerdTree. It seems that o and <cr> are equivalent in file-mode ...
Greg Nisbet's user avatar
  • 1,785
2 votes
1 answer
3k views

How can I install NERDTree without pathogen?

I have only one plugin at the moment (CtrlP) and I don't want to polute my environment with additional stuff that I'll have to depend on. So I tried installing NERDTree directly (cloned from git in ....
pesho hristov's user avatar
2 votes
1 answer
257 views

Vim hides files inside directories with brackets in the name

I've been dealing with a huge problem of NeoVim for weeks (also applies to Vim a GVim) and I failed to find the solution on my own. What's happening is that NERDTree is hiding the content of any ...
William García's user avatar
2 votes
2 answers
935 views

Disable cursorline when leaving NERD tree window

I want to disable cursorline when leaving the NERD tree window and enable it when entering the window again. The following setting works fine when using <C-w>w or similar, but not when <CR&...
aosho235's user avatar
2 votes
0 answers
148 views

Nerdtree display current opened file after jumping into a tag

I'm not sure if this is possible, I have my nerdtree opened for file let's say main.cpp. Then I use tag jump to one of the definitions which is in a different directory but nerdtree window still shows ...
JZ67's user avatar
  • 45
2 votes
1 answer
111 views

NERDTree-go does not leave cursor in the NERDTree

NERDTree.txt says: go.......Open selected file, but leave cursor in the NERDTree......|NERDTree-go| Open selected bookmark dir in current NERDTree But when I typo go in a NERDTree buffer, ...
moco's user avatar
  • 21
2 votes
1 answer
162 views

YCM causes some error while loading nerdtree

I'm using vim to do my code job and I installed Nerdtree and YCM. With this merge, YCM has two functions, which allows us to get the error and warning counts. Here is my .vimrc: autocmd VimEnter * ...
Yves's user avatar
  • 963
2 votes
1 answer
368 views

Weird extra text after my file name in nerdtree {language}

I'm not sure if it is duplicated or not, I tried to find Google also in here but cannot find the correct answer. I do not know why it shows {language} next to the file languages.js, as I use almost ...
Sang Dang's user avatar
  • 121
1 vote
1 answer
3k views

Change buffer focus on enter?

I set up my .vimrc so that NERDTree automatically shows up on the left when opening vim for editing a file (autocmd VimEnter * NERDTree). This means, that NERDTree is the active buffer instead, and I ...
Rápli András's user avatar
1 vote
4 answers
608 views

How can I edit trees in Vim?

If I'm not mistaken, NerdTree and Fern are for viewing directories, not for editing general trees (Ordered trees of strings in CS terms) If so, is there a way to edit general trees in Vim? (It should ...
user avatar
1 vote
3 answers
697 views

NERDTree maximize on enter

I'd like to maximize NERDTree when I enter the NERDTree buffer. The command I have so far is: autocmd BufEnter NERD_tree_* <A> ...but the <A> part is wrong. I get the error: E21: Cannot ...
Hoopes's user avatar
  • 305
1 vote
2 answers
663 views

How to manage windows properly

I've used two plugins with vim: Nerdtree and Taglist. However, if I quit the opened file and open another file in the Nerdtree, it will become: Which means that the new opened file is displayed at ...
Yves's user avatar
  • 963
1 vote
1 answer
9k views

Vim-devicons not working at all [closed]

I tried installing vim-devicons to be used with nerdtree(using vim-plugin). I tried devicons FAQ, everything is fine except "check if you are able to see the characters, from ex mode:", i tried ...
Ayush's user avatar
  • 111