LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 01: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, 01:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

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

Cheers,
Tink
 
Old 10-07-2010, 12:38 AM   #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, 01:01 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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, 01:05 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,651

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

Last edited by jlliagre; 10-07-2010 at 01:08 AM. Reason: Hmm, I was slow ...
 
1 members found this post helpful.
Old 10-07-2010, 01: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, 03:32 AM   #7
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

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

BTW you can use ip command.

Code:
# ip addr
Regards,
 
Old 10-07-2010, 04: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


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


All times are GMT -5. The time now is 12:57 PM.

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