mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
Add Split Different as a vim til.
This commit is contained in:
32
vim/split-different.md
Normal file
32
vim/split-different.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Split Different
|
||||||
|
|
||||||
|
Vim's defaults for `:split` and `:vsplit` are to open the splits above and
|
||||||
|
to the left, respectively. I prefer for them to the split below and to the
|
||||||
|
right, respectively. To get `:split` to split below:
|
||||||
|
|
||||||
|
```
|
||||||
|
:set splitbelow
|
||||||
|
```
|
||||||
|
|
||||||
|
and to get `:vsplit` to split to the right:
|
||||||
|
|
||||||
|
```
|
||||||
|
:set splitright
|
||||||
|
```
|
||||||
|
|
||||||
|
Add those two lines to your `.vimrc` to have them set that way all the time.
|
||||||
|
|
||||||
|
If you have them set as such in `.vimrc` and want to temporarily revert the
|
||||||
|
setting for the current file, type:
|
||||||
|
|
||||||
|
```
|
||||||
|
:set nosplitbelow
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```
|
||||||
|
:set nosplitright
|
||||||
|
```
|
||||||
|
|
||||||
|
as commands.
|
||||||
Reference in New Issue
Block a user