I'm preparing some shellscripts to avoid repetition of some usual tasks. Some of them involve opening a file and then using the:split
command invim
.
Is it possibleopen two files like this from thecommand line?
Indeed, it is, you can use thevim -o file1 file2
command. In this way vim will show the two files in split view, the first one in the upper section and the second one in the bottom section.
Top comments(2)

- LocationScotland
- EducationSomething something cybernetics
- PronounsThey/them
- WorkGeneral-purpose software person
- Joined
You can also use-O
for vertical splits, and if you omit either flag (and presumably havehidden
set), you will open them in hidden buffers, so you can navigate with:ls
,:b <n>
and:next
and so on.
You can open all your buffers in splits at any time with the best command in Vim::vertical ball
.

- LocationZaragoza, Spain
- WorkAss. Professor at Universidad de Zaragoza
- Joined
Nice, thanks. For thist matter I prefer using horizontal split but sometimes vertical is useful also.
For further actions, you may consider blocking this person and/orreporting abuse