Re: [Vim-latex-cvs] vimfiles/plugin imaps.vim,1.14,1.15
Brought to you by:
srinathava,
tmaas
From: Benji F. <be...@me...> - 2003-01-07 18:36:29
|
Srinath Avadhanula wrote: > On Mon, 6 Jan 2003, Benji Fisher wrote: > > >> My latest idea is to break up the RHS (in the example above) into >> "foo" and "" and "bar" and then to have IMAP_PutTextWithMovement() >> return something like >> >> "foo\<Esc>:call IMAP_YAHF(0)\<CR><++>bar\<Esc>:call >> IMAP_YAHF(1)\<CR>" > > Sounds like an excellent idea! > > I would suggest using something like "\<C-r>=IMAP_YAHF(0)\<CR>" > instead of "\<Esc>:call IMAP_YAHF(0)\<CR>" because the former doesn't > screw up the cursor positioning and moreover we remain in insert > mode... (IMAP_YAHF(0) could just return '' always, but internally > mark the cursor position in s:lastPosition. IMAP_YAHF(1) could return > "\<C-o>".s:lastPosition) As the abve string stands, by the time we > return from IMAP_YAHF(0), we are in escape mode and the bar is typed > in normal mode... I am sure this was just a prototype and you would > have used this anyway, but just putting my word in :) I got something that seems to work, but not exactly as you suggested. I called the new helper function IMAP_Mark(). I need to get some work done, so I cannot test this as much as I would like. --Benji |