Top Editors Interview Questions :: ALLInterview.com http://www.allinterview.com Top Editors Interview Questions en-us How to replace String &quot;a&quot; with String &quot;b&quot; in whole http://www.allinterview.com/showanswers/11025.html :g/string1/s//string2/g ex: :g/a/s//b/g what are the two different modes in vi editor? http://www.allinterview.com/showanswers/11027.html Command Mode Insert Mode LastLine mode Raam ramumcato@yahoo.com What is the command used to display line numbers in vi editor? http://www.allinterview.com/showanswers/11021.html esc : set number Repeating in Descriptive form Please come to command mode by pressing escape. Put : The typoe set number and enter You can view line nos What is the difference between ZZ and :wq commands? http://www.allinterview.com/showanswers/11056.html I guess both do the same task..! in the sense :wq,:x and ZZ are used to save the changes of edited to storage and quit.. but to jot down the difference a foolish one.. :wq and :x requires <enter> key to be pressed to fire this commands wher What does the /text command do? http://www.allinterview.com/showanswers/11060.html /text: it will search for the string. after pressing enter it takes u to that text location. Thank you, Raam ramumcato@yahoo.com What is the format of vi command? http://www.allinterview.com/showanswers/11055.html vi filename Raam ramumcato@yahoo.com what are the different delete commands used in vi editor? http://www.allinterview.com/showanswers/11026.html dd -- for delete line x - single character deletion dw - delete word Raam ramumcato@yahoo.com What is the command used to replace many characters? http://www.allinterview.com/showanswers/11057.html this question should bhave been for many same words that appear many times, for this press escape to go to command line, then type :%s/old_word/new_word/g g for global Which command is used to replace many characters? http://www.allinterview.com/showanswers/11059.html By pressing "Esc"+i key. How to return to shell without leaving vi editor? http://www.allinterview.com/showanswers/11054.html In the vi Press 'Esc' and ':' then Type 'shell' And you can go to shell and do different commands. To return to vi editor type 'exit' in shell prompt. what is the command used to append text after current line? http://www.allinterview.com/showanswers/11028.html :m,n w >> filename what does the c$ command do from command mode? http://www.allinterview.com/showanswers/11030.html c$ will begin from the character under the curser till the end of line. so when you use this command it will show you $ sign at the end of the line and you can change till that point. How to create a .exrc file in vi editor? http://www.allinterview.com/showanswers/11053.html Introduction This article presents a sample .exrc file that can be used by users of the vi editor. The .exrc file, located in your home directory, is the startup (or configuration) file for the vi editor. The intent of this brief artic How to append a file to current file? http://www.allinterview.com/showanswers/11052.html to append file1 to file2. first open file1 in vi editor using vi file1 command. then to append file1 to file 2 just use the following command. :w>>file2 so file 1 will be appended to file 2 what is the command used to set margin in vi editor? http://www.allinterview.com/showanswers/11029.html Press ESC followed by colon setnu eg => :setnu