如果确定,请保存更改(If You’re Sure, Save Your Changes) 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 befor...
记录。 14.2 执行外部命令 :! cmd 执行外部命令。 :!! 执行上一次的外部命令。 :sh 调用shell,用exit返回。 :r !cmd 将命令的返回结果文件当前位置。 :m,nw !cmd 将文件的m到n行之间的内容做为命令输入命令。 15. 其它 15.1 工作 :pwd 显示vim的工作目录。 :cd path 改变的工作目录。
:q -> 退出文件 (exit file without save) :q! -> 强制退出 (force quite without save) :e filename -> 打开一个文件名为filename的文件 (open file to edit) :e! filename -> 强制打开一个文件,所有未保存的东西会丢失 (force open, drop dirty buffer) :saveas filename -> 另存为 filename ...
:q -> 退出文件 (exit file without save) :q! -> 强制退出 (force quite without save) :e filename -> 打开一个文件名为filename的文件 (open file to edit) :e! filename -> 强制打开一个文件,所有未保存的东西会丢失 (force open, drop dirty buffer) :saveas filename -> 另存为 filename ...
4. Save the file with changes andexitVim with: :wq <ENTER> 5. If you have quit vimtutorinstep1restartthe vimtutor and move down to the following summary. 6. After reading the above steps and understanding them:doit. ~~~ Lesson1SUMMARY 1. The cursor is moved using either the arrow key...
" command to exit normally. However, when you use the ":wq!" command to save the file and exit, these error messages prompt: Vim Can't Save File (E212) Vim can't open file for writing Root user can't open file for writing
Save the file with changes and exit Vim with: :wq 保存对文件的修改,并退出vim: :wq If you have quit vimtutor in step 1 restart the vimtutor and move down to the following summary. 如果你在步骤1中退出了本教程,启动本教程并移步到以的总结。 After reading the above steps and understanding...
$FZF_VIM;printf "\033]51;[\"call\",\"Tapi_Fzf\",[\"$FZF_VIM\",\"exit\"]]\007"')&...
Enter :wq to save the change and exit Vim. Run the vim < File name> command to open the file. You are not prompted to enter a password. Run commands Run the !pwd command to query the current working directory without the need to exit Vim. Run the !ls command to query the fil...
You can exit vi from EX mode: q: if you haven't made any modifications, or saved them beforehand q!: ignores any modifications andquit wq: save and quit x: this is equal to wq w and x accept file name parameter. If you started vi with a filename, you need not give it here aga...