Menu

#42 new imaps.vim seems not work properly

v1.0 (example)
open
nobody
None
5
2013-07-12
2013-07-12
No

My VIM version is:
VIM - Vi IMproved 7.4a BETA (2013 Jul 6, compiled Jul 11 2013 23:06:26)
Included patches: 1-10

I found that the latest vim-latex-suite does not work well.

When I type SSS in insertmode, I get something like this:

SSS\subsection{}<++>

the SSS won't be erased automatically.

I've tried a older version of imaps.vim and it works fine.

the diff between the two scripts is bellow.

--- imaps.vim.old 2013-07-12 16:15:28.886778415 +0800
+++ imaps.vim.new 2013-07-11 22:30:56.438937712 +0800
@@ -285,7 +285,8 @@
" enough back-spaces to erase the left-hand side; -1 for the last
" character typed:
let bs = substitute(strpart(lhs, 1), ".", "\<bs>", "g")
- return bs . IMAP_PutTextWithMovement(rhs, phs, phe)
+ " \<c-g>u inserts an undo point
+ return a:char . "\<c-g>u\<bs>" . bs . IMAP_PutTextWithMovement(rhs, phs, phe)
endfunction

" }}}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.