I currently use ctrlp to navigate between buffers in vim , but whenever i try to switch to another buffer it automatically splits the current window horizontally into the two windows .
In order to avoid this or open the new buffer in a whole window i have to first write the initial buffer to the disk then open ctrlp and switch to the second buffer .
How to get vim to open the new buffer in a full window rather then a split one ?

  • 1
    Do you have :set hidden or no? – D. Ben Knoble Jun 23 at 12:15
  • 1
    @BLayer explicitly stated – polendina Jun 23 at 17:46
  • 1
    @D.BenKnoble thanks that did work out . – polendina Jun 23 at 17:47

Probably you just need to :set hidden. Without it, you cannot "hide" a buffer with unedited contents; it must be written or wiped. My guess is CtrlP detects this case and splits open instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.