Then hit :wq to save it and "run" it. Still...why does it behave this way?
Shouldn't I be able to choose not to run the command when I exit
from Bash's vi editing mode?
This is on a Centos 5 machine, and the terminal is a Gnome terminal.
Thanks,
Ven
-- On Fri, Mar 23, 2012 at 11:05 AM, Ven Tadipatri <vtadipatri@gmail.com> wrote:
Hi,This may sound like a real newbie question, but when I do the "set -o vi"in the bash command line shell, if I hit <Esc> and v on the command line,it goes into vi editing mode. This is kind of cool, as I can exercisethe full editing power of vi, and when I exit the editor it runs the command.Unfortunately, sometimes I may have a really powerful/dangerous/unnecessarycommand that I've typed, and all I want to do is just cancel, not execute thecommand. How do I do this?:q! doesn't seem to work, as the command still runs. :wq , well, I don't wantto save anything, I just want to get out of the editor and return to the plainold bash prompt.Is this possible? Of course I can always kill the terminal that I'm runningin to avoid running the command as soon as vi exits. Or I can try to pressctrl+C as fast as possible.I was hoping for a better alternative.Please help.Thanks,Ven
You received this message from the "vim_use" 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
No comments:
Post a Comment