LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Multiple files in vi (https://www.linuxquestions.org/questions/linux-newbie-8/multiple-files-in-vi-836578/)

rajesh1978 10-06-2010 12:42 PM

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

Tinkster 10-06-2010 12:51 PM

By going to it?
Code:

<ESC>:next

Cheers,
Tink

rajesh1978 10-06-2010 11:38 PM

It is not working.
I gave <esc> :next but it is showing the message
E163: There is only one file to edit

Tinkster 10-07-2010 12:01 AM

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

jlliagre 10-07-2010 12:05 AM

To move from one window to the next one under vim:
Code:

<CTRL-W><CTRL-W>

rajesh1978 10-07-2010 12:26 AM

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

sem007 10-07-2010 02:32 AM

It is better to open new thread for new question.

BTW you can use ip command.

Code:

# ip addr
Regards,

rajesh1978 10-07-2010 03:47 AM

Yes I got it
It is hostname -i

Thanks


All times are GMT -5. The time now is 02:53 PM.