diff options
author | Urbain Vaes <urbain@vaes.uk> | 2023-01-20 11:26:45 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2023-01-20 11:26:45 +0100 |
commit | 59b8d5dcceeab12285864f6d0239b59b70f77def (patch) | |
tree | 8dbac988410e1d224f72eb87594e4c0454561c50 /vim/.vim/after/ftplugin/tex/mappings.vim | |
parent | b9c6d426220abb93a05755402b81d3c87fe73210 (diff) |
[Latex] Use anonymous snippet instead of imap
Diffstat (limited to 'vim/.vim/after/ftplugin/tex/mappings.vim')
-rw-r--r-- | vim/.vim/after/ftplugin/tex/mappings.vim | 8 |
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 |