On 08/05/12 14:51, Johannes Deutsch wrote:
> since i use supertab i'm able to do supersonic completions with
> vim. Unfortunately the super fast completion has the disadvantage
> that i select the wrong item from time to time (especially with
> regard to filename completion where several completions are made
> in succession). The annoying thing about that is, that not every
> completion is in a separate chunk in the undo 'buffer' (sorry i
> don't have the precise word for this kind of stack or whatever).
> So i have to delete the last completion by hand and start the
> completion again.
>
> I would prefer that before a completion vim switch from
> insert-mode to normal-mode and back so that i could undo every
> single completion.
Though I haven't used "supertab" so I don't know the particulars, it
sounds like you want to modify the behavior so that <tab> in
insert-mode drops an undo point. You can do this with
:help i_CTRL-G_u
so you'd do something like
:inoremap <tab> <c-g>u<tab>
Or, if <tab> is already mapped for use by supertab, you can modify
the mapping to insert the 6 characters above ("<c-g>u") before the
rest of the mapping's contents.
-tim
--
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
Sunday, August 5, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment