Questions tagged [split]

Questions about splitting current window into multiple viewports.

Filter by
Sorted by
Tagged with
39
votes
1answer
16k views

How to open multiple files in split mode?

I know how to split windows in vim, but it's possible to open multiple files using vim in split mode (at startup) from the command line? In example: vim file1 file2 file3 or: vim *.cpp
124
votes
6answers
67k views

How do I change the current split's width and height?

I am working on split (using ^w+v, ^w+s) buffers, but sometimes I would like to widen a current split or change its height. How can I achieve that?
79
votes
4answers
100k views

Is it possible to split Vim window to view multiple files at once?

When working with multiple files, it would be very handy if we can see more than one file in the screen at once. Is there any way in Vim to split the window (horizontally or vertically) so each split ...
12
votes
1answer
697 views

What is the difference between a tab, viewport, window, split and buffer?

What is the difference between the following in vim: buffer window viewport split tab
16
votes
1answer
2k views

How can I get both splits to scroll left or right at the same time?

I want to open up two different parts of a document in horizontal splits (using :sp) and scroll both of them left and right together. For vertical scrolling, you would use scrollbind. However, I'm not ...
15
votes
2answers
2k views

How to exit vim from split mode?

How to efficiently exit vim when editing multiple files in the split mode at one go? It seems when I'm having e.g. 10 split windows, I've to repeat 10 times :q! command for each window which is a bit ...
6
votes
1answer
1k views

Vertical equivalent of “control+w n”?

I often want a new empty vertical pane (vim window / viewport ...) in my current Vim tab. I know I can get a new empty horizontal pane by doing control+w n. I know I can split the current pane into ...
6
votes
1answer
502 views

Hide statusline when more than two windows open without suffering the extra hidden empty line artifact?

I want to hide the statusline, I don't ever use nor care about what is written in it. The problem is vim doesn't offer a way to achieve that in a convenient manner. If I just do set laststatus=0 I ...
6
votes
1answer
718 views

How to change the location of a new vertical split?

The question is somewhat straightforward. To open a vertical split, I use: :vs. When opening a vertical split, I'd like to initialize it with a file directly. If I do :vs myfile.txt this will move ...
4
votes
1answer
644 views

How to lock a window height / width?

I jot notes in a tiny split window (buffer) regularly: <C-W>s :enew :res 5 ... jot jot... When I create a new horizontal split in the same tab, that little window resizes, as if doing <C-W&...
2
votes
1answer
148 views

gvim cmd line offset issue when doing horizontal splits?

Not sure how to explain this but basically I'm using an external plugin/dll to enable fullscreen in gvim (which is very lame since this should be a built-in feature...). The problem in when I open a ...
16
votes
2answers
5k views

Make panes resize when host window is resized

I like to use vimdiff as a git diff/merge tool. The problem is when I resize the host terminal window to a new size: of the two split panes, the leftmost remain of the same width, while the rightmost ...
17
votes
4answers
4k views

Send text from one split window to another

Recently there was an add-on to NeoVim which allows opening terminal in a vim buffer. This has appealing possibilities to send text from one vim window to another replicating, for example, a REPL like ...
13
votes
2answers
3k views

How do I open a new buffer without opening it in a split?

I know I can use :new to open a new buffer in a split window (defined by set splitbelow and set splitright). But how can I just open a new, empty buffer without opening it in a split?
4
votes
1answer
1k views

Buftype=nofile when switching buffers with :Vexplore

When I open up :Vexplore in a split and open a file in it, the file in the other split ends up with buftype=nofile set so I can't write in that file or anything. But the new buffer that was opened ...
7
votes
4answers
405 views

What workflow to use when editing large multifile projects

Lately I've been shifting more nad more of my work from IntelliJ to vim. With a handful of plugins and setting tweaks, I don't miss the IDE much. One thing I do miss is the ease of navigating a large ...
4
votes
1answer
646 views

Having issues maping <C-j> and <C-h> in vim [duplicate]

I tried to remap my split navigation like explained here. Moving to the top or right split works but ther other two just do nothing. I tried the same without a .vimrc which led to the same result. ...
1
vote
2answers
122 views

Split: automatically load corresponding file

I am porting autotools project to CMake. So, every directory of the project has CMakeLists.txt and Makefile.am. I want to make a split: CMakeLists.txt on one side and the corresponding Makefile.am on ...
1
vote
1answer
225 views

shortcut to open definition of variable in a vertical split

I use the vertical split command a lot :vsplit, and I also have click on ctrl] to look at the definition of a variable (after generating the Ctags). I would like to do a keyboard shortcut that does ...