vim save file and exit command
collates VIM save and exit commands as follows:
command span> p> td> |
simple description span> p> td> tr> |
: w span> span> p> td> |
save the edited content of the files, but don’t quit vim span> editor. The purpose of this command is to write the data from the memory buffer to the file specified when you start vim. |
:w! span> span> p> td> |
forced write files, or forced to cover the original file. You can use this command to force a write if the original file has access that does not allow writing to the file, for example, if the original file is read-only. However, this command usage applies only if the user is the owner of the file, not to the superuser. span> p> td> tr> |
: wq span> span> p> td> |
to save the file content after exit vim span> editor. The purpose of this command is to write the data from the memory buffer to the file specified when you start vim, and then exit the vim editor. Another alternative is to use the ZZ command. |
:wq! span> span> p> td> |
exit after being forced to save the file content vim span> editor. The purpose of this command is to force the data from the memory buffer to the file specified when you start vim, and then exit the vim editor. ZZ1 |
: q span> span> p> td> |
without doing any editing process and ready to quit vim span>, you can use this command. No write since last change (:quit! overrides) |
:q! span> span> p> td> |
require a vim span> editor, give up the result of the editing process. If you really don’t need to save the contents of the modified file, type :q! “command, forced to exit vim editor. span> p> td> tr> |
: w |
writes the editor after processing the results of the specified file save span> p> td> tr> |
: w! |
0 compulsorily saves the edited result to the specified file, overwriting the existing file if the file already exists. |
:wq! |
0. |
span>