If you’re happy with the changes you’ve made to your file, you can exit and save the changes using the:wq(write and quit) command. Make sure you are entirely satisfied that you want your screen edits written to the file before you proceed. 如果对文件所做的更改感到满意,则可以使用:wq...
退出vi编辑器,并保存文件的命令是。 Exit from the vi editor and save the file command.1、:w2、:q3、:q!4、:
To Exitvi Usually the new or modified file is saved when you leavevi. However, it is also possible to quitviwithout saving the file. Note:The cursor moves to bottom of screen whenever a colon (:) is typed. This type of command is completed by hitting the<Return>(or<Enter>) key. Mo...
5. Saving and Exiting To save your changes and exit Vi, you need to switch to the last-line mode. Here are some commands for saving and exiting: –:w: Save the changes made to the file –:q: Quit Vi if there are no unsaved changes –:q!: Quit Vi without saving any changes –:...
VIEditor+void editFile(String filename)+void saveFile()+void exitEditor()CustomPlugin+void enhanceEditing()+void addShortcuts() " 定制配置 set nu " 显示行号 set tabstop=4 " 设置 tab 为 4 个空格 autocmd BufWritePre * :%s/\s\+$//e " 保存前清除行尾空格 ...
Second, type:q!and press Enter. This tellsvito quit without saving any changes. (If you do want to save your changes, type:wqinstead.) 其次,输入:q!然后按Enter。 这告诉vi退出而不保存任何更改。 (如果确实要保存更改,请键入:wq。)
:wfile name Save with Given File Name :q! Quit Without Save :wq Save And Quit :n Places Cursor At Nth Line. :$ Places Cursor At Last Line In The File : Set nu Set Line Numbers : Set nonu To Remove Line Numbers :!<UNIX command> Execute UNIX Command ...
Enter w to save changes to the file without exiting the editor. Saving Changes and Exiting Use the following command sequence to save the changes and exit the editor Press Esc to enter the Command mode. Type : to launch the prompt bar. Now enter wq (write and quit) or x to save cha...
Note that you can also start vi without specifying a file name by just typing vi. You can then name the file later when you exit vi. 6.1.2 The Status LineThe last line of the screen, called the status line, shows the name of the file and the number of lines and characters in the...
Mastering the VI editor Summary of VI commands This list is a summary of VI commands, categorized by function. There may be othercommands available, so check the on-line manual on VI. For easy reference, you can save this file as text and delete any commands you don't think you would ...