I am using VIM version 7.3 and I installed NERDTree plugin.
The issue I am facing is that when in run VIM, NERDTree doesn't open by default although it should with the settings below. Also a more CRITICAL issue is that it won't let me browse folders. What I mean by that is. It will list the folders in the current directory but when I try to open a folder by hitting enter it will not expand that folder.
What have I missed here? My .vimrc is given below :
" Start pathogen plugins "
2 call pathogen#infect()
3
4 " Automatic syntax highlight on "
5 syntax on
6
7 " Necessary for NerdCommenter to Work "
8 filetype plugin indent on
9
10 set nocompatible
11 source $VIMRUNTIME/vimrc_example.vim
12
13 " Replace tabs with spaces
14 set expandtab
15
16 " make tab 2 space wide
17 set tabstop=2
18 set shiftwidth=2
19
20 "Auto indent, smart indent and wrap lines
21 set autoindent
22
23 " stop vim from creating backups
24 set nobackup
25 set noswapfile
26 set nowb
27 set nowritebackup
28
29
30 set number
31
32 set hlsearch
33 set ignorecase
35 colorscheme desert
36 set background=dark
37
38
39 let g:nerdtree_tabs_open_on_console_startup=1
40
41 set ff=unix
42 set showtabline=2
43 set smarttab
44 set incsearch
45
46 set history=1000
47
48 set undolevels=1000
49 set title
The command let g:nerdtree_tabs_open_on_console_startup=1
works only if you have vim-nerdtree-tabs installed. To open NERDTree at startup you have to insert that command into your .vimrc autocmd vimenter * NERDTree
.