Does someone know how to force .vimrc to auto-open NERDTree each time vim is invoked? The operation system is *nix.
If you want to use NERDTree, you can open NERDTree (type :NERDTree ), navigate to your file, and then press t with cursor on the file name. This will open specific file in new tab.
(1) Thus, if your edit window is to the right of the NERDTree window, you would use: ctrl + W l to go to right window and ctrl + W h to go to left window. or ctrl + w twice to toggle between the two.
au VimEnter * NERDTree
in your vimrc should do it
:he autocmd.txt for background
You can also only open Nerd Tree when there was no file on the command line:
function! StartUp() if 0 == argc() NERDTree end endfunction autocmd VimEnter * call StartUp()
Taken from a blog post by Ovid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With