summaryrefslogtreecommitdiff
path: root/vim/.vim/after
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2023-01-20 11:26:45 +0100
committerUrbain Vaes <urbain@vaes.uk>2023-01-20 11:26:45 +0100
commit59b8d5dcceeab12285864f6d0239b59b70f77def (patch)
tree8dbac988410e1d224f72eb87594e4c0454561c50 /vim/.vim/after
parentb9c6d426220abb93a05755402b81d3c87fe73210 (diff)
[Latex] Use anonymous snippet instead of imap
Diffstat (limited to 'vim/.vim/after')
-rw-r--r--vim/.vim/after/ftplugin/tex/mappings.vim8
1 files changed, 6 insertions, 2 deletions
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 <buffer> [[ \left[
" iabbrev <buffer> ]] \right]
iabbrev <buffer> :: \colon
-inoremap <buffer> ^^ ^{}<Left>
-inoremap <buffer> __ _{}<Left>
+
+" inoremap <buffer> ^^ ^{}<Left>
+" inoremap <buffer> __ _{}<Left>
+
+inoremap <silent> __ __<c-r>=UltiSnips#Anon('_{$1}$0', '__', '', 'i')<cr>
+inoremap <silent> ^^ ^^<c-r>=UltiSnips#Anon('^{$1}$0', '^^', '', 'i')<cr>
iabbrev <buffer> ga \alpha
iabbrev <buffer> gb \beta