multiple vi editor


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users multiple vi editor
# 1  
Old 07-04-2011
multiple vi editor

Hi Friends,

Can some1 pls tell me how to do multiple vi editor(files) in a single screen and how to switch from file to another in that.

Thanks
# 2  
Old 07-04-2011
With plain old vi, you don't (unless you mean GNU screen, and not just a terminal window). With VIm, you have the choice between buffers and tabs.
# 3  
Old 07-04-2011
Please try this

  • vi file1 file2 file3
  • :n Edit next file (file2)
  • :n Edit next file (file3)
  • :rew Rewind to the first file (file1)
# 4  
Old 07-04-2011
You can open a file in vi, and then within this session, you can open multiple files using :e filename.
you can switch to other currently opened files using ctrl+6.
Do remember it will allow you to switch to other files only when your current file is in saved mode.
# 5  
Old 07-05-2011
hi all,
many thnks for the response. Smilie
# 6  
Old 11-25-2011
Hi chindu.anu,

I am able to switch to with ":n" and ":rew".
but I not able to save both file. when i did ":wq" only one is saved.

any idea how to save all the files in multiple editor?

---------- Post updated at 05:15 AM ---------- Previous update was at 05:06 AM ----------

Hi,

I got my answer,
we can achive this by ":w" to save first what we have written before going to another file.

Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Not able to use @ in VI editor

Hello All, Need one Help for one issue. I am using a French Keyboard, so @ sign is on key 0 and i have to use right Alt + 0 to print it. It is working everywhere but not inside Vi editor. I can type @ in shell, in notepad. But inside Vi editor it is not working, another problem is that if... (2 Replies)
Discussion started by: yadavricky
2 Replies

2. Shell Programming and Scripting

Grep from multiple patterns multiple file multiple output

Hi, I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command. Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns. Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies

3. Shell Programming and Scripting

Help with vi Editor

1) vi editor normally opens in Execution mode . We have to press ESC + i to go to edit mode . But , I wanted the vi to open directly in edit mode . :confused: 2) One more query , When I create a NEW file using vi editor ....is there any way can I have the default text ...... For example : I... (4 Replies)
Discussion started by: frintocf
4 Replies

4. Ubuntu

How to remove multiple spaces in between word? (VI EDITOR)?

What last line mode command allows me to remove extra spaces in between words in a text? (1 Reply)
Discussion started by: rabeel
1 Replies

5. Solaris

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :License server is down (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

6. Shell Programming and Scripting

set EDITOR=vi -> default editor not setting for cron tab

Hi All, I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by set EDITOR=vi it does not open a vi editor , rather it do as below..... ///////////////////////////////////////////////////// $ set... (6 Replies)
Discussion started by: aarora_98
6 Replies

7. UNIX for Dummies Questions & Answers

Pasting text in VI editor from a different editor

Hi, I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question. How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'? As i see, p & P options does work only within 'vi'. (10 Replies)
Discussion started by: harishmitty
10 Replies

8. UNIX for Advanced & Expert Users

vi editor

Hi, how can I add at the begining and at the end of all of the lines of my text file in VI editor ? Many thanks before. for exemple if in my file i have line 1 line 2 I want to have : start line 1 end start line 2 end (3 Replies)
Discussion started by: alain123456
3 Replies

9. HP-UX

instead VI editor - which one?

I'd like to find some editor for HP-UX, something like notepad, but not VI editor. Can someone have some ideas which one? thx (6 Replies)
Discussion started by: diamond
6 Replies

10. Shell Programming and Scripting

Vi editor ?

Hello everybody, My question is: how to add /tmp/work at the end of line in vi editor. my file looks like: cp file1 cp file2 cp file3 **** I need to add " /tmp/work" at the end of each line. I tried this :%s/$/" /tmp/work" and this :%s/$/\ /tmp/work\/ but it does not work. (2 Replies)
Discussion started by: billy5
2 Replies
Login or Register to Ask a Question