Skip to content

Commit

Permalink
Plugins NERDTree and NERDTree Tabs
Browse files Browse the repository at this point in the history
These two plugins let you view your project's files in a sidebar similar
to Sublime or your favorite IDE.
  • Loading branch information
jez committed Feb 25, 2015
1 parent 457f2e2 commit b7ff90c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Plugin 'altercation/vim-colors-solarized'
Plugin 'tomasr/molokai'
Plugin 'bling/vim-airline'

" ----- Vim as a programmer's text editor -----------------------------
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'

call vundle#end()

filetype plugin indent on
Expand Down Expand Up @@ -60,3 +64,10 @@ let g:airline_detect_paste=1
let g:airline#extensions#tabline#enabled = 1


" ----- jistr/vim-nerdtree-tabs -----
" Open/close NERDTree Tabs with \t
nmap <silent> <leader>t :NERDTreeTabsToggle<CR>
" To have NERDTree always open on startup
let g:nerdtree_tabs_open_on_console_startup = 0


7 comments on commit b7ff90c

@jez
Copy link
Owner Author

@jez jez commented on b7ff90c Feb 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(<-- prev step) ... (next step -->)

This should have been in the file itself, but to enable NERDTree to always open on startup, you need to change the ... = 0 to a ... = 1. Sorry about that.

There are two plugins here. NERDTree is responsible for opening up the project tree browser. NERDTree Tabs is responsible for opening up the same project tree browser on every tab.

Use \t to open or close the sidebar. For more usage information, press ? inside the NERDTree sidebar, and read the project documentation:

@GalaxyCr8r
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try this, even after changing the =0 to a =1 nothing shows up at start, and when I try \t it says "E492: Not an editor command: NERDTreeTabsToggle"...

After restarting several times, my /.vim/bundle/ folder is still empty minus the Vundle folder... Is Vundle supposed to be automatically downloading these plugins? I skipped the colorscheme part because I am fine with PuTTY's colors but it doesn't seem to be doing any of the plugins..

@andreimarcu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same issue, went on the Vundle github.
You have to do a :PluginInstall in vim for every time you have a new plugin in your .vimrc

@GalaxyCr8r
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha awesome! Thanks.

@ahmedelgabri
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Vim 7.4 you can have nearly the same functionality of NerdTree with the file explorer.

let g:netrw_liststyle = 3
let g:netrw_winsize   = 15
let g:netrw_banner = 0

nmap <leader>d :Lex<CR> " This will toggle the file explorer on/off

@jez
Copy link
Owner Author

@jez jez commented on b7ff90c Feb 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmedelgabri That's actually what I did until up until I started preparing for this talk. I had never used NERDTree before, but I knew that a lot of people in general liked it, so I figured that a lot of people in the audience might like it too.

@liangfeidotme
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I replaced my .vimrc with very this script, error happened as below.

Error detected while processing function <SNR>38_VimEnterHandler..<SNR>38_NERDTreeOpenAllTabs..<SNR>38_NERDTreeMirrorOrCreate..197..198..181..123:
line   14:
E488: Trailing characters

Please sign in to comment.