vi
der.hans
PLUGd at LuftHans.com
Fri Sep 10 08:48:42 MST 2021
Am 10. Sep, 2021 schwätzte Michael via PLUG-discuss so:
moin moin MIchael,
> how does one save and exit with vi?
Carefully. :)
vi is a modal editor with editing mode and command mode.
To exit cleanly, you need to be in command mode.
Hit <esc> to make sure you're in command mode, then you can give an exit
command, which starts with a colon.
:q == simple quit if there have not been changes to the file
:wq == write the current changes, then quit
:q! == quit and throw away any changes
There are other variants you might see in documentation. They're
essentially aliases for one of the above.
ciao,
der.hans
--
# https://www.LuftHans.com https://www.PhxLinux.org
# Dissent is patriotic.
More information about the PLUG-discuss
mailing list