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 can show a different file?
Is there a way to make vim (or nvim) open all new splits vertically by default? There's splitright to control which side vertical splits open on, but as far as I can tell there's no built in option to make splits vertical by default. Does anyone…
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 the file I am currently working on to the right and…
Referring to the existing leftabove and rightbelow commands, which do the following:
execute a command
if the command results in a split, it will be either opened on the left, or above the current window for leftabove (and analogously for…
I can open a file with vim on the command line like so:
vim fnord.txt +50
And it will take me to the 50th line
Is it possible to do the same thing with :split? So far I haven't been able to figure out how to do it.
:split fnord.txt +50
:split…
I am looking for a way to toggle between these two layouts:
-------
| | |
-------
-------
| |
-------
| |
-------
I only have two windows and I need to switch the layout often. I need a solution that will preserve the aspect ratio of…
I am writing a function which splits open vim in three parts but the focus shifts towards the newly opened window and I don't want that that to happen is there any way to stop this? or is there a command which does this for me so that i can insert…
When working on a file, I often open another file by
looking for the file by opening the file browser in a vertical split with :Vex
Opening the file
it's actually nice to have the file browser show up on the left side, but I would like to have the…
Suppose I have a long python file which is limited to 79 character or so in width. One very helpful feature would be if I could view the whole file separated into multiple vertical splits which "extends" each other. This way, a wide monitor or…
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 to first buffer in buffer list. If the
buffer…
I have a file that is 9 lines long called foo.txt . I use
:split foo.txt
and the new split takes up a full 50% of the editor, which results in a lot of wasted space.
I can resize it with :resize ctrl-R=line('$') but I have to type it manually each…
I have been searching for a way to do the following but haven't found exactly what I need, not sure if it's possible.
I want to be able to split a file, but have the same features over the two splits as if I was in a single pane. Let me give an…
I use the keybinding Ctrl+W >/< to increase/decrease width of the split window, and that works just fine when the split window is in the left.
However when I switch to any split beside the one on the far left, I don't feel like this specific…
Currently, I'm using C-wC-h-type of shortcuts to navigate through open editors. However, in VS Code, I'm also used to using shortcuts like C-1 to go to the first editor group, instead of hopping through them all until I reach the first one.
Is there…