From 59b8d5dcceeab12285864f6d0239b59b70f77def Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 20 Jan 2023 11:26:45 +0100 Subject: [Latex] Use anonymous snippet instead of imap --- vim/.vim/after/ftplugin/tex/mappings.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vim/.vim/after/ftplugin') diff --git a/vim/.vim/after/ftplugin/tex/mappings.vim b/vim/.vim/after/ftplugin/tex/mappings.vim index a69f752..8ada80e 100644 --- a/vim/.vim/after/ftplugin/tex/mappings.vim +++ b/vim/.vim/after/ftplugin/tex/mappings.vim @@ -5,8 +5,12 @@ " iabbrev [[ \left[ " iabbrev ]] \right] iabbrev :: \colon -inoremap ^^ ^{} -inoremap __ _{} + +" inoremap ^^ ^{} +" inoremap __ _{} + +inoremap __ __=UltiSnips#Anon('_{$1}$0', '__', '', 'i') +inoremap ^^ ^^=UltiSnips#Anon('^{$1}$0', '^^', '', 'i') iabbrev ga \alpha iabbrev gb \beta -- cgit v1.2.3