When running shell commands in a terminal buffer I often just want to examine the output, and then close the buffer. Let's say I call :term ls. How would I implement a simple "Press any key to close" which wipes out the terminal buffer on pressing any key?

  • 2
    Instead of using :terminal, how do you feel about :! or :r!? e.g. :!ls` or :r! ls Apr 13 '18 at 21:17
  • Good point. I guess I like the fact that :term opens a new buffer and thus fills the entire window, whereas the output of :! is only printed in, what?, a quickfix window? Anyway, I prefer the look of whatever :term does.
    – sieste
    Apr 13 '18 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.