* On Thu, May 25, 2006 at 08:30:52AM -0400, Benji Fisher <[EMAIL PROTECTED]> wrote: > > The problem consists in the combination of a few things: > > - a nmapping selects (as in select-mode) a few characters > > - an imapping calls a function (through i_CTRL-R) that executes the > > previous mapping with :normal, and then returns "\<esc>" to terminate > > the INSERT-SELECT mode and finish in select-mode. > > I do not have time to look at this closely, but I assume it is > because certain undocumented modes are now no longer supported. This > was discussed on the vim users' list on the thread "Insert Visual > mode", started by Gerald Lai on April 22. (That is from my personal > mail archive; I assume that is enough information for you to find the > thread.)
Indeed that's linked my problem. Thanks for the reference. The fork of mu-template i'm maintaining is one of these scripts that rely on i_CTRL-R to insert stuff (with :r actually), and then finish in insert- or in select-mode depending on the presence of a placeholder/marker in the text inserted. > I see the following note in doc/version7.txt : > > --- fixes and changes since Vim 7.0f --- > [...] > Prevent that using CTRL-R = in Insert mode can start Visual mode. Must I understand that the workaround I've found won't work in the future ? (the workaround consists in returning <c-\><c-n><c-\><c-n>gv<c-g> to i_CTRL-R=) What about @= ? Can I use it to execute a sequence that will change the mode to insert- or select-mode, according to the result of my function ? Or is it also an undocumented feature that may not be supported in the future ? -- Luc Hermitte http://hermitte.free.fr/vim/