[EMAIL PROTECTED] wrote:
Hi,is it possible to get out of a started "change command" (dont know, whether this is this the correct naming...) with a single key pressed ? For example the text is Vim is a #eally$nice editor."#" is marking my cursor position and "$" is the sign appearing after I have submitted "cfn" already. Since vim is really a nice editor, I do not want to change anything and pressed "cfn" by accident. Hmmm....<ESC> kills everything between "#" and "$"... "u" would undo it...but this like "do the wrong thing and repair it afterwards". What I want is to prevent doing wrong things by aborting them,..not to do them and saying "ooops sorry...my fault" afterwards and starting repairing the desaster then... :) So....how can I _abort_ this ? Keep editing! mcc
In my version of Vim, as soon as you hit cfn the text is deleted and Vim is in Insert mode, awaiting the replacement text. So it's too late to abort, the best you can do is undo, using either <Esc>u or <C-R>" as the other replies said.
Best regards, Tony. -- Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gage, nor any of the numerous idiot lights which plague the modern driver. Rather, if the driver makes any mistake, a giant "?" lights up in the center of the dashboard. "The experienced driver", he says, "will usually know what's wrong."
