Server NOOB - how do i save a file after VI?
Hello, after VI.... a file, how do i save it and return to command prompt?
|
press:
esc : w (this will save) you can also do: esc : wq! (this will save and leave the editor) |
do i press that all at the same time or do i press escape then : then wq?
|
You press them sequentially.
|
Ok, thanks
|
actually
:wq - save file and exit :q - quit, will refuse if unsaved changes exist :q! - quit without saving changes. :x - save file if changed and quit Just google for a complete list of vi commands. |
If you have a redhat distro, you may want to run through "vimtutor", that will open a file with a VIM guide and you just walk your way through it.
|
If you're lazy, you can type in "ZZ" to save and quit (capitalization matters).
|
Ok, thanks, :)
|
All times are GMT -5. The time now is 10:57 PM. |