aliases | category | classification | date | date_modified | draft | id | image | links | local_archive_links | pinned | series | tags | title | type | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
vim |
public |
2022-11-16 09:22:41 -0800 |
2022-11-16 09:22:41 -0800 |
false |
20221116172241 |
false |
false |
|
Open Files Side-By-Side with Vim |
tech-note |
I'll often want to open a couple of files in Vim and then split the main window so I have one file on the left, and one file on the right. I've just learnt that you can tell Vim to open each in it's own split, a vertical split or a horizontal split.
# Vertical split:
vim -O <file1> <file2>
# Horizontal split:
vim -o <file1> <file2>
It works with more than one file as well, so you could open three files, and have a pane for each.