vi:Visual Editor,是一个模式化的文本编辑器。 vim:Vi IMproved,是vi的一个增强版本,提供了更多功能和更好的用户体验。 :wq:这是vi/vim中的一个命令,意为“write and quit”,即保存文件并退出编辑器。 可能的原因及解决方案 输入错误: 确保你在命令模式下输入:wq,而不是在插入模式或其他模式下。
常用的底线命令 :w (write)将缓冲区写入文件,即保存修改 :wq (write and quit)保存修改并退出 :x 保存修改并退出 (x和wq的区别:wq 强制性写入文件并退出。即使文件没有被修改也强制写入,并更新文件的修改时间。:x 写入文件并退出。仅当文件被修改时才写入,并更新文件修改时间;否则不会更新文件修改时间。) :...
To save a file in Vim, use the command :w or: write Q. What is the command to save and quit in Vim? The command to save and quit in Vim is :wq or :x. Q. How do I quit the editor without saving the file in Vim? To quit the editor without saving the file in Vim, you ...
As you begin to use vi, you'll find that it is an extremely powerful text editor, and that it may take you a while to become proficient.Note that there is a read-only version of vi called view. When you open a file with view, you can use vi commands, but you cannot write (or...
:q Quit editor :q! Quit,discarding buffer :wq Write buffer and quit :x Write if needed & quit :f Edit & file status :r Read file into buffer :r file Read named file in :e (Re)edit file :e! (Re)edit,discard file in :e file Edit nameed file ...
在liunx中用vi修改inittab的id后,保存退出时会显示E492:Not an editor command:qw,是设置错误造成的,解决方法如下:1、首先在liunx中输入vi文件名,按回车即可打开对应的文件,如果没有对应的文件,那么vi命令就会自动创建一个新的。2、vi打开文件后是命令模式状态,在编辑模式的情况下敲完内容,这个...
Type a colon, the letter w (write) and the letter q (quit). Press the Enter key when you can see them in the lower left of the terminal: 输入冒号,字母w(写)和字母q(退出)。 当您在终端的左下方看到它们时,请按Enter键: 代码语言:javascript ...
The vi editor dates from the time when not all terminal keyboards had cursor movement keys, so everything you can do in vi can be done with the keys typically found on a standard typewriter plus a couple of keys such as Esc and Insert. However, you can configure vi to use additional ...
Type a colon, the letter w (write) and the letter q (quit). Press the Enter key when you can see them in the lower left of the terminal: 输入冒号,字母w(写)和字母q(退出)。 当您在终端的左下方看到它们时,请按Enter键: :wq
Both writes the file and quits (exits) the editor. The file is written only if it has been modified. :w! can also be used to save edits in a file that was opened in read-only mode. :q! is an essential editing command that allows you to quit without affecting the original file, ...