Alex Rivera | Logout

How to make NERDTree always open on the right side?

Asked 2011-02-25T10:53:23.213
56

NERDTreeToggle always makes it show up on the left side. I'd like to make it show up on the right. Is it possible to do that?

Edit
Report

2 Answers

111

Add this line to your .vimrc:

let g:NERDTreeWinPos = "right"
answered 2011-02-25T10:57:27.307
1

You can change the window position in your NERD_Tree.vim file too. I usually like looking through .vim files, if only to help keep my .vimrc file clear.

Here is the code to change:

call s:initVariable("g:NERDTreeWinPos", "left") "default
call s:initVariable("g:NERDTreeWinPos", "right")

The code should be at line number 90, if not then I have included the default so that you can search for it.

Also, here is a link for some info on the NERD_Tree.vim file.

answered 2011-04-19T10:51:23.160

Your Answer