say I have two files: file1 and file2
is there a single command that I can run on terminal to open ONE vi screen which is vertically splited and show file1 and file2 on either side?
Thanks,
Cheng
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@cheng I asked this on #vim channel briefly some weeks ago. At that time, could come up with this solution:
In example below, I opened
file1.txtfirst in vi, and felt need offile2.txtsplitted in vertical frame.Initially, it opens the file1.txt in full screen, then 2nd command, splits that file on vertical pane. 3rd command opens file2.txt in horizontal splitted mode. 4th one jumps over to the first vertical splitted module and last one closes that.
Obviously, this approach is just usable when you have to open the file in ongoing vim session.
As @ravi mentioned in link,
vim -o file1.txt file2.txtat start will do the same job.I will highly appreciate the simpler approach for the desired task. 🙂