Below is the empty Vundle config.
" set the runtime path to include Vundle and initialize
" let Vundle manage Vundle, required
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin ...
The examples below set the width to 60 columns. Adjust to your preferences.
NERDTree uses a variable for just this:
This will set the width to 60. You can put this line into your vimrc.
For taglist, you set a similar option:
Like with NERDTree, you can put this line into your vimrc.
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:
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:
See :help ...
The list of filename arguments can be obtained by calling argv(), so you could put something like this in your ~/.vimrc:
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 ...
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:
let c = 0
let wincount = winnr('$')
" Don't open it here if current buffer is not writable (e.g. NERDTree)
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
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 ...
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>:...
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 ...
There is currently no way to do this.
From the source code (ref. lib/nerdtree/opener.vim line 238):
if self._reuse && self._reuseWindow()
And the _reuseWindow() function (ref. line 309):
"check the current tab for the window
let winnr = bufwinnr('...
This solution only works with vim 8+
You can add this to your .vimrc:
let currentWindowID = win_getid()
windo if win_getid() != currentWindowID && &filetype != 'nerdtree' | close | endif
command! Only call OnlyAndNerdtree()
The function gets the id of the current window with win_getid() then it ...
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>
The first line makes CtrlP not overwrite your custom mapping.
And the second ...
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.
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.
You cannot filter the buffer at its creation, you should wait until you have
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
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
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
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)
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:
In order to fix this, you need to tell your Tabularize mapping to ignore existing mappings, and instead use the default functionality. You do ...
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
In NERDTree, press m to bring up the NERDTree Menu, and then you should see an option, labeled o, to open the current node with the system editor associated with that file or directory. If that doesn't work for you, create an issue in the NERDTree repo.