LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-28-2010, 12:32 AM   #1
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Rep: Reputation: 63
vim help,how to open multiple files with vsplit?


vim -o file1 file2 opens two files spliting the window horizontally.
How to do that vertically?
 
Old 03-28-2010, 12:42 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
Code:
vim -O file1 file2
It's a capital 'o'
 
1 members found this post helpful.
Old 03-28-2010, 01:22 AM   #3
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Original Poster
Rep: Reputation: 63
Quote:
Originally Posted by sycamorex View Post
Code:
vim -O file1 file2
It's a capital 'o'
If i do vim file1.txt and :vsplit then how to get another file opened in that window?
 
Old 03-28-2010, 02:16 AM   #4
barshani
LQ Newbie
 
Registered: Sep 2004
Location: Trivandrum
Distribution: Redhat
Posts: 18

Rep: Reputation: 3
:vi filename
 
Old 03-28-2010, 03:15 AM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,550

Rep: Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898
Change to new window and :e filename works too
 
Old 03-28-2010, 06:24 AM   #6
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Original Poster
Rep: Reputation: 63
Quote:
Originally Posted by barshani View Post
:vi filename
Does vi mean vi editor or visual mode?
 
Old 03-28-2010, 06:24 AM   #7
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Original Poster
Rep: Reputation: 63
Quote:
Originally Posted by grail View Post
Change to new window and :e filename works too
Is :e for editing or ex mode?
 
Old 03-28-2010, 06:59 AM   #8
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,550

Rep: Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898
Editing
 
Old 09-21-2011, 12:22 PM   #9
cristalp
Member
 
Registered: Aug 2011
Distribution: Linux Mint
Posts: 103

Rep: Reputation: Disabled
Quote:
Originally Posted by cola View Post
If i do vim file1.txt and :vsplit then how to get another file opened in that window?
open a file by vim, then in that file type

Code:
:vsplit ANOTHERFILENAME
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Vim help,editing multiple files cola Linux - Newbie 5 03-28-2010 01:01 AM
vim : i wanna open several files using tabs at the same time cryincold Linux - Software 3 11-02-2008 08:25 PM
Open multiple files in Vim using Nautilus mjmwired Fedora 3 06-28-2007 07:31 PM
Is there option to open files in background in vim? nadavvin General 1 02-07-2007 07:16 AM
multiple files in VIM james.farrow Linux - Newbie 3 07-09-2004 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration