On Saturday, April 11, 2015 at 10:30:27 AM UTC+5:30, Yuri wrote: > Once in a while I get into this after accidentally typing the wrong command: > # vim some-file | some-cmd > bash: some-cmd: command not found > Vim: Warning: Output is not to a terminal > ^C > > Ctrl-C doesn't kill vim. So I have to press Ctrl-Z and then have to > either 'killall vim', or trying to determine what is the pid of vim to kill. > Is there any way to make it just die on Ctrl-C in such situation? > > Thanks, > Yuri
you could create a script $HOME/bin/vim: #!/bin/sh if [ -t 1 ]; then exec /usr/bin/vim "$@" else echo "Not starting vim without stdout to TTY!" >&2 exit 1 fi ...put $HOME/bin first in your PATH. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
