Re: vi

Top Page
Message as email
+ (text/plain)
+ (text/plain)
Delete this message
Reply to this message
Author: der.hans via PLUG-discuss
To: Michael via PLUG-discuss
CC: der.hans
Subject: Re: vi
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.


# Dissent is patriotic.---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings: