Re: [Vim-latex-cvs] vimfiles/plugin imaps.vim,1.14,1.15
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2003-01-06 19:31:01
|
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 :) > Does anyone see any problems with this approach? Any objections > (other than the profusion of helper functions)? > No objections. I think this will solve those placement problems in a mathematically correct manner :) Srinath |