Results 1 to 9 of 9
cmd : vi file1 file2 file3
the above command creates three files ie.file{1,2,3}
but once inside the vi after writing text in the first file how do I move onto ...
- 05-10-2009 #1
[SOLVED] vi multiple file's
cmd : vi file1 file2 file3
the above command creates three files ie.file{1,2,3}
but once inside the vi after writing text in the first file how do I move onto 2 and so forth
- 05-10-2009 #2Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
Use the -o option when running vi:
Then use the key sequence ^m^j to move forward to the next file.Code:vi -o file1 file2 file3
Use ^m^k to move back to the previous file.
To write all three file when exiting use the command: :wqa
- 05-10-2009 #3
This might help:
Vim buffer FAQ - Vim Tips Wiki
- 05-11-2009 #4
what is ^j^m
hey thanks for your reply
but i didn'y understand what is ^j^m
is it cntrl + j +mOnly if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-11-2009 #5
It should be Ctrl+j and Ctrl+m.
I don't have to access to Linux box right now and can't confirm it.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 05-11-2009 #6
cntrl+j and cntrl+m
but form where i.e form insert mode or form :
I hear the beep all the time!!!Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-11-2009 #7
Try bn and bp for buffernext and bufferprevious in ex mode.
- 05-11-2009 #8
can u please out some light wat is ex mode and bn and bp mode
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-11-2009 #9
finally got the solution. Open all the files in vi that u want to edit by passing the name of the file as arguments.
eg: vi file1 file2 file3
then to sift to the next file simply type":n" and enter. There you are on the other file. This link may be helpful Working With Multiple Files in viOnly if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu


