tags:

views:

42

answers:

3

I'm trying to modify project.vim to open the project window on the right side instead of in the left. I see several references in the source to "vertical new", "vertical split" and "vertical resize". Trying them I see that a new vertical split is opened to the left, but I can't find how can I make a new vertical split open (or move) to the right side. I know the command Control-W + r will move the window to the right, but I don't know how this is done using vimscript.

+2  A: 

Try changing vertical new to rightbelow vertical new.

Also, see :help vertical and all the friends listed just after it.

Randy Morris
A: 

Maybe you should consider using wincmd r after doing a vertical split. <C-w>c and wincmd c most of time are equivalent.

ZyX
A: 

You can also set splitright so that vertically split windows are always created on the right hand side.

Update:

It seems the plugin is coded quite inflexibly, so you'll need to take one of two approaches:

1) Change this line in the plugin's source code

let b:proj_locate_command='silent! wincmd H'

to

let b:proj_locate_command='silent! wincmd L'

or 2) For whichever mappings you use to open the project window, append <C-W>L or :wincmd L to the end of the mappings.

You should also email the author and ask for him/her to provide a way to configure this behaviour more easily.

too much php
For some reason, it works for my windows but not for project.vim windows. Also, I don't want all windows to be on the right - for example the NERD_tree or taglist windows.
juanjux