I want to open three files file1.txt
file2.txt
file3.txt
in vertical and horizontal split combination, like this:
+-------------------------------+
| | |
| file1.txt | |
| | file3.txt |
| | |
| | |
+---------------+ |
| | |
| file2.txt | |
| | |
| | |
+-------------------------------+
(ascii art done with http://asciiflow.com/)
I know about -o
and -O
options from this question:
How to open multiple files in split mode?
However as I read in help -o
adding more than one flag overrides the other so nothing like
vim -o file1.txt file2.txt -O file3.txt
is going to work.
I was also thinking about saved sessions but I'm not sure if that's the right way to go.
Q: What's the best way to achieve this or similar custom layout (for example with three files on the left insted of two)?
Additional info about the use case: I'm writing script to generate a learning flashcard from a longer text and wanted to add an interactive step where user can edit prepared flashcard in vim. Question and answer part would be displayed on the left and the full text on the right.