Florian F
Florian F

Reputation: 8875

ctrlp : open selected file in the left vertical split

When using ctrlp, I can open a selected file in a new vertical split using ctlr-v

However, the new file open in the left split and the already opened one goes to the right split. I'd like the opposite to happen : opening the new file in the right split.

Workaround : Using ctrl-w + ctrl-r afer opening the file to invert splits

Upvotes: 5

Views: 6237

Answers (3)

Felipe Candal Campos
Felipe Candal Campos

Reputation: 174

I'm a few years late here, but from the plugin :help docs, it says that you can configure the new tab position:

a - after.
b - before.
c - the current tab page.
l - the last tab page.
f - the first tab page.

For your desired behaviour, you should include this in your .vimrc or the configuration file of your editor.

let g:ctrlp_tabpage_position = 'ac'

I hope that someone in the future find this useful.

Upvotes: 1

Ignas Butėnas
Ignas Butėnas

Reputation: 6317

You can also use <c-v> to open file in vertical split.

Upvotes: 18

Arjen Dijkstra
Arjen Dijkstra

Reputation: 1559

If you create the setting in your vimrc:

set splitright

it will open every file you open in a vertical split on the right side (not only CtrlP).

Upvotes: 6

Related Questions