Open quickfix in current vertical split

Viewed 682

I usually use a layout of one vertical split and two different buffers. When i use :copen, the quickfix window always opens in the right split, regardless where my cursor is. Consequently, if my cursor is in the left split, and I issue the commands :copen, :cclose, the buffer is changed.

Is there any way of opening the quickfix window in the same vertical split where my cursor is?

1 Answers

As a specification, quickfix is opened in right column whenever vsplit. It is unreasonable to respond to your order... but, perhaps it seems to work as expected;

command! Lcopen :copen | :wincmd p | :wincmd L | :bp | :wincmd h | :bn

I want you to keep in mind that it depends on Buffer's state.

Related