开发者

How to move or create a window on the right side on Vimscript?

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 开发者_StackOverflow中文版this is done using vimscript.


Try changing vertical new to rightbelow vertical new.

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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜