Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7962177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:15:44+00:00 2026-06-04T05:15:44+00:00

say I have two files: file1 and file2 is there a single command that

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:15:46+00:00Added an answer on June 4, 2026 at 5:15 am

    @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.txt first in vi, and felt need of file2.txt splitted in vertical frame.

    vi file1.txt
    Ctrl+W+v 
    :sp file2.txt
    Ctrl+W+w
    :q
    

    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.txt at start will do the same job.

    I will highly appreciate the simpler approach for the desired task. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say that I have two CSV files (file1 and file2) with contents as shown
Say I have two files where there is one number per line File 1
I have two source files created in unix folder say file1.dat and file2.dat. I
I have a program that I can run in two ways: single-end or paired-end
Let's say I have a single solution file that references N project files. There's
Let's say I have two files default.aspx and the associated default.aspx.cs . default.aspx.cs: protected
Say I have two classes and have a requirement that the primary key property
Say I have two functions that expect ...rest parameters private function a(...myParams):void { trace(myParams.length);
Say I have two 2D vectors, one for an objects current position and one
Say I have two log files ( input.log and output.log ) with the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.