Monday, August 27, 2012

Re: CTRL-W in insert mode

On Mon, Aug 27, 2012 at 12:01 PM, Jürgen Krämer
<jottkaerr@googlemail.com> wrote:
>
> Hi,
>
> A Loumiotis wrote:
>>
>> CTRL-W in insert mode deletes the word (part of the word) left of the
>> cursor. Is it possible to undo this action?
>
> perhaps the following map does what you want
>
> inoremap <c-w> <c-g>u<c-w>
>
> This remaps the Ctrl-W to first break the undo sequence and then execute
> the original behaviour of Ctrl-W.
>

Thanks Jürgen for your help. I tried your suggestion but I couldn't
make it work. I'm relatively new user of VIM so I might be doing
something wrong. I solved my problem though by pressing:
<esc> u
after i press <c-w> in insert mode.

--
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