-- Leo's gemini proxy

-- Connecting to thrig.me:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

vi Exit Strategies

TIMTOWTDI - "there is more then one way to do it"


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.


ex Exit Strategies


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

-- Response ended

-- Page fetched on Wed May 22 02:10:34 2024