ctrlp : open selected file in the left vertical split
Asked Answered
H

3

5

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

Heterozygous answered 10/4, 2015 at 14:51 Comment(0)
G
6

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).

Glittery answered 11/4, 2015 at 16:19 Comment(0)
D
18

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

Down answered 18/5, 2015 at 13:53 Comment(0)
G
6

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).

Glittery answered 11/4, 2015 at 16:19 Comment(0)
U
1

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.

Ultimatum answered 19/4, 2021 at 12:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.