Questions tagged [split]

Questions about splitting current window into multiple viewports.

20 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
0 answers
645 views

Persistently fix the height of a split in vim

So I searched the web far and wide and I can not for the life of me figure out how to do this. I have the following key binding: nnoremap <leader>o :below 10sp term://.//$SHELL <cr> :set ...
Otis Wright's user avatar
6 votes
0 answers
97 views

Filetype changes when using :split and :Explore

Why does using :split and :Explore cause the filetype to change? For example, edit a file named text.man, and the filetype is set to man. Change the filetype to txt, then :split and :Explore in the ...
xn.'s user avatar
  • 161
5 votes
0 answers
137 views

Intermittently cannot switch from Vim terminal to other panes

I've looked at quite a few other posts and haven't found a similar problem. I've recently begun using WSL and Vim and love it. Most of the time, it works great and I use CTRL-W-h/j/k/l to navigate ...
Christina Nguyen's user avatar
3 votes
0 answers
158 views

:sbr opens buffers with horizontal split, even with switchbuf set to vsplit

I've set switchbuf to vsplit but when I use :sbr, vim uses a horizontal split to open the new buffer. This seems directly contrary to what :help sbr says: :sbr[ewind] [+cmd] Split window and go ...
Haldean Brown's user avatar
2 votes
0 answers
32 views

Method for each split to have its own undo buffer?

Often, I want to edit multiple different parts of the same file simultaneously. This is usually done with a number of splits. Is there a way such that the undo history in each split is separate? E.g., ...
Walt W's user avatar
  • 121
1 vote
0 answers
90 views

Neovim 'tab' or 'vert' no longer splits, just creates buffer

When I start a neovim session, my first command is to startup a terminal session within vim. However lately (perhaps due to an OSX update?) any use of vert or tab no longer performs a vertical split, ...
Doug T.'s user avatar
  • 111
1 vote
0 answers
141 views

How to split view all buffers in vim with equal distribution vertical horizontal

How can I split view all buffers in vim with a distribution between vertical and horizontal? Is there a plugin? I know how to make all buffers appear in either horizontal or vertical splits: :ball :...
Polo's user avatar
  • 31
1 vote
0 answers
88 views

How can I overlap windows, use non-rectangular windows, or dock a window in the corner?

I'm working on a text file (my notes/todo document), and I want to have the to-do list part of the document open in one Vim window (to check things off), with another to look at the rest of the ...
interfect's user avatar
  • 163
1 vote
0 answers
212 views

Using fzf inside vim with double star completion

I wonder if it is possible to use fzf inside vim the same way it can be used on the command line. So, on the command line I can do vim file** and it will use fzf to search 'file'. I wonder if this is ...
Hielke Walinga's user avatar
1 vote
0 answers
38 views

No automatic scrolling when opening splits

When using plugins, splits are often created to show something, e.g. a quickfixlist or the taglist. If the split is opened (especially for horizontal splits), the original window is automatically ...
earthling's user avatar
  • 133
1 vote
0 answers
133 views

How to pin a file to a window(/viewport)

When I have multiple files open in multiple splits, when I open a new file via quickfix ( or Ctrl-P ), it sometimes ends up placing the new file in a window that I don't want to be changed. Is there ...
woodstok's user avatar
  • 195
1 vote
0 answers
600 views

How to close splits automatically when changing file or closing VIM?

I am trying to create my own IDE like setup inside of VIM. This is what I have. I am also using Tmux here if you wonder about the bottom terminal screen. If I change file to another CPP within ...
iProgram's user avatar
  • 1,589
1 vote
0 answers
138 views

:vsp sometimes making one split bigger than other and hiding NERDTree

So most of the time I have my standard layout like this: And every now and then I want to open a split in the main buffer using :vsp and most of the time that looks like this: And that is what I ...
Otis Wright's user avatar
0 votes
1 answer
38 views

Resizing split panes in vim with {n}Ctrl-W +/- not working as described on MacOS

I am using vim on MacOS. I have one vertical split down the middle and two panes split horizontally on the left side ( :Vex Ctrl wh :Sex ). From my understanding nCtrl w +|- should resize the focused ...
ThinkingInBits's user avatar
0 votes
1 answer
41 views

Vim - open wrong path when I run command ':vs .' run in Vim

When I run the :vs . command in Vim for the current working directory window split, the parent directory opens, not the current directory. Example: A/B/C$ vi test.c in Vim: :vs . Split window ...
linuxias's user avatar
  • 109
0 votes
0 answers
27 views

Is it possible to fix a section of buffer fixed on top even when scrolling?

I need to open 4 different files on my screen to consolidate data on diff file . I kept forgetting which tile is which file.. All my files has file name on line 1.. Is there way to keep the line 1 ...
purityKEF's user avatar
0 votes
0 answers
27 views

After opening all args with :ba, go back to a single split

Generally when opening more than two or three files in vim, I use a single split, navigating between the files/buffers with :n/:N. Sometimes, however, I want to open all of them in visible splits at ...
judeanpeoplesfront's user avatar
0 votes
0 answers
118 views

Why does my syntax highlighting disappear after so many splits?

I can successfully run :sp *filename* several times per vim session, but after a seemingly-random number of splits (5-10) all future splits will no longer have syntax highlighting until I fully quit ...
squarebase's user avatar
0 votes
0 answers
38 views

Put previous jump location in other buffer

I have multiple interesting buffers in my jumplist, but I would like to view two of them side-by-side. How would you do that? That's the general case of this question. In my particular case, it is ...
TamaMcGlinn's user avatar
-1 votes
1 answer
89 views

Edit a file in two different terminal windows

It's nice to edit the same file from two different views. I use a vsplit for this, as described here, and it works well. However, I'd like to have the two views open in different terminal windows, ...
Adam Selker's user avatar