💾 Archived View for thrig.me › blog › 2022 › 11 › 26 › vi-exit-strategies.gmi captured on 2024-08-18 at 17:41:56. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-11-14)
-=-=-=-=-=-=-
This is for ex-vi as seen in OpenBSD. Other flavors of vi may have fewer, more, or different options available. Some of these will fail if the buffer has been modified, e.g. :q would need to become :q! or :wq and ZZ might need to be ZZZZ if the vi has the "more files to edit" bug.
cmd comment : and then see ex Exit Strategies Q and then see ex Exit Strategies ZZ
Assuming a shell with job control, control+z and then kill %1 among other methods of killing the shell, xterm, or whatever other means is being used to provide an environment for vi to run in. On some unix (or whatever passes for unix these days) one may execute a :! command, find the parent vi of that process, and kill that.
Most of the vi exit strategies actually involve ex in some way.
cmd comment vi and then see vi Exit Strategies q short for quit, pairs well with "w" or followed by "!" x short for xit (with saving)
Some of this is historical baggage that could be simplified in one of those "whitewash the Church walls (hopefully without a 30 years war)" simplification events. Such an event could be good, bad, or neither good nor bad.
tags #vi