LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-06-2010, 12:42 PM   #1
rajesh1978
LQ Newbie
 
Registered: Jun 2010
Posts: 26

Rep: Reputation: 0
Talking Multiple files in vi


Hi,
I have opened a file using vi i.e. abc.txt
now I have given : new xyz.txt

two files now opened in the vi
My problem is i can scroll through abc.txt only.
how to scroll the xyz.txt also
please help
 
Old 10-06-2010, 12:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
By going to it?
Code:
<ESC>:next

Cheers,
Tink
 
Old 10-06-2010, 11:38 PM   #3
rajesh1978
LQ Newbie
 
Registered: Jun 2010
Posts: 26

Original Poster
Rep: Reputation: 0
It is not working.
I gave <esc> :next but it is showing the message
E163: There is only one file to edit
 
Old 10-07-2010, 12:01 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Sorry, I didn't realise that you had split windows in vim

Just use Ctrl-w, and the normal vim commands for moving (hjkl)
between multiple windows.


Cheers,
Tink
 
Old 10-07-2010, 12:05 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
To move from one window to the next one under vim:
Code:
<CTRL-W><CTRL-W>

Last edited by jlliagre; 10-07-2010 at 12:08 AM. Reason: Hmm, I was slow ...
 
1 members found this post helpful.
Old 10-07-2010, 12:26 AM   #6
rajesh1978
LQ Newbie
 
Registered: Jun 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Thanks to both of you. It is working now.
I have one more doubt. I want to know my ip address (without using ifconfig)
Is there any way. I have seen long back someone using like machine -i ( not sure)
If there is any way then please tell me
 
Old 10-07-2010, 02:32 AM   #7
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
It is better to open new thread for new question.

BTW you can use ip command.

Code:
# ip addr
Regards,
 
Old 10-07-2010, 03:47 AM   #8
rajesh1978
LQ Newbie
 
Registered: Jun 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Yes I got it
It is hostname -i

Thanks
 
  


Reply



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
How to find multiple strings into multiple files ? moicpit Linux - General 10 04-25-2010 11:19 AM
Creating a script to move or copy files into multiple directories below the files matthes138 Linux - Newbie 5 08-25-2009 04:57 PM
copying multiple files in multiple folders ?? stratotak Linux - Newbie 2 02-21-2009 09:41 AM
Change text in multiple files in multiple directories vivo2341 Linux - General 5 11-27-2006 08:16 PM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 05:25 PM

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

All times are GMT -5. The time now is 01:19 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
Open Source Consulting | Domain Registration