32

In your vimrc add nmap <F6> :NERDTreeToggle<CR> where <F6> is the key you want to map.


31

Below is the empty Vundle config. set nocompatible filetype off " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " let Vundle manage Vundle, required Plugin 'gmarik/Vundle.vim' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin ...


20

The examples below set the width to 60 columns. Adjust to your preferences. NERDTree NERDTree uses a variable for just this: :let g:NERDTreeWinSize=60 This will set the width to 60. You can put this line into your vimrc. Taglist For taglist, you set a similar option: :let g:Tlist_WinWidth=60 Like with NERDTree, you can put this line into your vimrc. ...


11

To open NerdTree : :NERDTreeFocus To switch beetween nerdtree and file opened windows : ctrl + ww (double w) or ctrl + w + (h/j/k/l) To close NerdTree (in nerdtree window) : :q


9

You could try either TagList or TagBar but such a list could be generated as needed (no third party tool or configuration needed) with a simple: :g/func/# See :help :global. If you don't mind a little bit of per-filetype configuration, the :dlist command could be used to list every function in the current file and included files: :dlist / See :help ...


9

The NERD tree quick help is accessible from the NERD tree window by typing ? There I read: " Filesystem mappings~ ... " r: refresh cursor dir " R: refresh current root These should do what you ask.


7

The list of filename arguments can be obtained by calling argv(), so you could put something like this in your ~/.vimrc: if empty(argv()) NERDTree endif Note that putting a command in your ~/.vimrc, whose contents are executed before any plugins are normally loaded, requires that the source for that command be sourced first. Alternatively, you could ...


6

Finally found a way to do this that doesn't involve closing NERDTree all the time. I made a function that cycles through the open windows until it finds a writable buffer, then runs ctrl-p there: function! CtrlPCommand() let c = 0 let wincount = winnr('$') " Don't open it here if current buffer is not writable (e.g. NERDTree) while !empty(...


6

Spelling is the issue. Plugin 'scroolosse/nerdTree' Should be Plugin 'scrooloose/nerdTree' The double s is the clincher. GitHub Scrooloose NerdTree repo


5

I usually use a combination of j and the / search (with the incsearch setting enabled) to jump to where I want to be. In your example, I probably would have done something like /hello<enter><enter>/sou/<enter><enter>j<enter>. One thing I really like about this method is that I can search for any substring. Some of my ...


5

As the question doesn't seem to generate a lot of answer I'll just answer it with the suggestion of @muru which is what I have used for a week before I switched to the netrw explorer. (Of course if a better option answer comes up I'll gladly unmark mine as accepted and accept the new one) The idea is to use the folowing mapping: map d<cr> <cr>:...


5

You can change your autocommand to execute <c-w>w after executing NERDTree. To do so you can use wincmd which is the equivalent of pressing <C-w> but with a command (see :h :wincmd) autocmd! VimEnter * NERDTree | wincmd w


4

I have this problem all the time with splits not being tall enough so I've added this key binding to my .vimrc: " open the current split all the way map <c-o> :res 100<CR> You can adapt this to make the split wider by using :vertical resize. For example, map <c-o> :vertical resize +10 which will increase the vertical size of the split ...


4

There is currently no way to do this. From the source code (ref. lib/nerdtree/opener.vim line 238): function! s:Opener._openFile() if self._reuse && self._reuseWindow() return endif And the _reuseWindow() function (ref. line 309): function! s:Opener._reuseWindow() "check the current tab for the window let winnr = bufwinnr('...


4

This solution only works with vim 8+ You can add this to your .vimrc: function! OnlyAndNerdtree() let currentWindowID = win_getid() windo if win_getid() != currentWindowID && &filetype != 'nerdtree' | close | endif endfunction command! Only call OnlyAndNerdtree() The function gets the id of the current window with win_getid() then it ...


3

From @jonasl answer, you could also do: let g:ctrlp_cmd = ':NERDTreeClose\|CtrlP'


3

I've tripped on this one too many times too: I've solved it by remapping the <c-p> to closing NERDTree (if open) and then opening CtrlP. Put this in your .vimrc: let g:ctrlp_map = '' nnoremap <c-p> :NERDTreeClose\|CtrlP<CR> Explanation: The first line makes CtrlP not overwrite your custom mapping. And the second ...


3

This would do exactly what you've asked for: nnoremap <silent> <expr> <F6> g:NERDTree.IsOpen() ? "\:NERDTreeClose<CR>" : bufexists(expand('%')) ? "\:NERDTreeFind<CR>" : "\:NERDTree<CR>"


3

If you use the netrw plugin (which is included by default in recent versions), you can sort by date. Start netrw with the command :Ex (or :Vex to make it open as vertical split or "side pane" as you call it) then change the sorting order with s. You may also want to see the change dates. You can see this by pressing i.


3

Instead of just asking if there are no arguments, you could also ask if the buffer is empty. If you substitute !argc() in your autocmd by !argc() && bufnr('$') == 1 && line('$') == 1 && getline(1) == '' you should get the desired result.


3

Putting this in your vimrc should fix the re-source issue: " after a re-source, fix syntax matching issues (concealing brackets): if exists('g:loaded_webdevicons') call webdevicons#refresh() endif


3

tl;dr You cannot filter the buffer at its creation, you should wait until you have more informations. First attempt I used the :debug NERDTree command to see all the calls that this function makes. When trying to stop it before the end I noticed something : A buffer was created, without name, without filetype. And it had the position/size of the nerdtree ...


3

From the documention it would seem that it should be using your ~/Sites/project directory. (See :h :NERDTree) :NERDTree [<start-directory> | <bookmark>] *:NERDTree* Opens a fresh NERD tree. The root of the tree depends on the argument given. There are 3 cases: If no argument is given, the current directory ...


3

I figure out the reason why this plugin doesn't work: git clone https://github.com/aufgang001/vim-nerdtree_plugin_open.git ~/.vim/vim-nerdtree_plugin_open.git The instruction is wrong, it should put inside ~/.vim/bundle (at least in my case): git clone https://github.com/aufgang001/vim-nerdtree_plugin_open.git ~/.vim/bundle/vim-nerdtree_plugin_open.git


3

For those curious, if NerdTree can xdg-open: Yes it can. Put the cursor on the desired file. Press m for the context menu. Press o to open in the system editor. Enjoy.


3

Judging by the documentation, NERDTreeFind is a command, not a function. This means you do not need :call. nnoremap <silent> <leader>y :NERDTreeFind<cr>


3

The linked question asks how to jump directly from File 3 window to NERDTree window without hopping through File 1 or File 2 window first. The OP's solution is to use the mouse to click on the NERDTree window. If you're just asking for a non-mouse way to do that then one answer is 2^wh. That is, hit 2 then Ctrl+W then H. (Refer to :h CTRL-W_CTRL-H) However, ...


3

The problem is that when you invoke your Tabularize mapping, the : in the right-hand-side of the mapping is remapped to a ; by your colon map, and the keystrokes that are then invoked are: ;Tabularize /=<CR> In order to fix this, you need to tell your Tabularize mapping to ignore existing mappings, and instead use the default functionality. You do ...


3

It's right there in the NERDTree help. Like it says at the top of the NERDTree window: Press ? for help " File node mappings~ " double-click,<CR>,o: open in prev window " t: open in new tab " T: open in new tab silently


3

NERDTree does a great many things that are... unvim-like... in order to give the IDE “project drawer” experience. I consider most of them hacks, and I’m wary of a plugin which has to hack around default behaviors and usages to do something I don’t need (see Oil and Vinegar). All of that said, one of its hacks is actually quite normal—it’s an unlisted ...


Only top voted, non community-wiki answers of a minimum length are eligible