Questions tagged [split]

Questions about splitting current window into multiple viewports.

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
1answer
727 views

Vi and Vim default to split left and split above. What is the history and motivation behind this?

When a window is split, given that Vi/Vim splits are not stored in a tree structure, the "direction of the split" is basically "the window in which the cursor is placed after the command". Update ...
8
votes
0answers
506 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 ...
4
votes
0answers
45 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 ...
3
votes
0answers
123 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 ...
3
votes
0answers
76 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 ...
2
votes
0answers
30 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., ...
1
vote
0answers
38 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 ...
1
vote
0answers
82 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 ...
1
vote
0answers
37 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 ...
1
vote
0answers
61 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 ...
1
vote
0answers
472 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 ...
1
vote
0answers
119 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 ...
0
votes
0answers
27 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 ...
0
votes
0answers
22 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 ...
0
votes
1answer
42 views

Adapt side panels to different screen resolution (aspect ratio)

How can I adopt side panel plugins (TagBar, TagList, NerdTree, etc) width to current screen aspect ratio? Using Vim with many different computers makes me a bit trouble to write one portable config ...