I have
which means
- quit, unless something needs to be saved
- just quit
My meanings for these keys clashes with vim's idea that stdin needs to be saved, e.g.
$ git log | vim -- q
- vim says
No write since last change ... - Look at keyboard, find shift
- Q
And I can then quit.
How can I tell vim to ignore file saving when using "-" to read for input from stdin?
vim -: anything sent to stderr is interpreted by vim as a command. To avoid this, you'd want to redirect stderr to stdout:git log 2>&1 | vim -– Matt Boehm Mar 25 '15 at 14:46qis very handy and used to record macros (see:h q). You may want to think about a different set of keys for you mapping. Maybe use a<leader>. See:h mapleader. – Peter Rincker Mar 25 '15 at 16:53qmapped toexitin bash,sys.exit()in python, and so weiter. – jalanb Mar 25 '15 at 23:21