[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vile] Can I remap ZZ?

From: Chris Green
Subject: [vile] Can I remap ZZ?
Date: Fri, 9 Oct 2015 16:02:22 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Simple, silly question but I can't see the answer at the moment.

Can I remap ZZ so that I can program a 'do something on exit' script
of some sort?

If I create something that uses anything but ZZ I'm bound to forget
and just do ZZ anyway!  :-)

... or is there any sort of hook that will allow me to execute
something when exiting from a modified file/buffer?

This refers back to my question a few days ago, if I squirt a file
into vi via stdin I want to do something on exit.  As it is if you
'ZZ' after modifying a buffer that has come in as stdin you get an
    Buffer "[Standard Input]" is modified.  Write it, or use :q!

If I could trap this error and do something with the modified buffer
it would solve my problem because ZZ with an unmodified buffer exits
which is OK.

Chris Green

reply via email to

[Prev in Thread] Current Thread [Next in Thread]