Saturday, January 2, 2010

Re: embedded :x :w :q

Dennis German wrote:
> Has anyone written a script to intercept :x being input as text and
> execute the :x
> ( or a :q which would fail with warning if changes were made),
> avoiding the syndrome known as
>
> :x [ENTER]*@#$! [DEL][DEL][DEL][ESC]:x[ENTER]

I've never had the problem because I tend to live in normal mode,
leaving insert mode as soon as I've entered my text. However, it
wouldn't be too hard to do something like

:inoremap :x<cr> <esc>:x<cr>

-tim

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment