summaryrefslogtreecommitdiff
path: root/vim/.vim/after/ftplugin/tex/mappings.vim
blob: 8ada80ec14d9820be1495fa5e9a3fc7248a9a9a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
" iabbrev <buffer> (( \left(
" iabbrev <buffer> )) \right)
" iabbrev <buffer> {{ \left\{
" iabbrev <buffer> }} \right\}
" iabbrev <buffer> [[ \left[
" iabbrev <buffer> ]] \right]
iabbrev <buffer> :: \colon

" 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
iabbrev <buffer> gc \xi
iabbrev <buffer> gd \delta
iabbrev <buffer> ge \varepsilon
iabbrev <buffer> gf \phi
iabbrev <buffer> gg \gamma
iabbrev <buffer> gh \theta
iabbrev <buffer> gi \iota
iabbrev <buffer> gk \kappa
iabbrev <buffer> gl \lambda
iabbrev <buffer> gm \mu
iabbrev <buffer> gn \nu
iabbrev <buffer> gp \pi
iabbrev <buffer> gq \psi
iabbrev <buffer> gr \rho
iabbrev <buffer> gs \sigma
iabbrev <buffer> gt \tau
iabbrev <buffer> gw \omega
iabbrev <buffer> gx \chi
iabbrev <buffer> gy \eta
iabbrev <buffer> gz \zeta

iabbrev <buffer> gB \Beta
iabbrev <buffer> gC \Xi
iabbrev <buffer> gD \Delta
iabbrev <buffer> gF \Phi
iabbrev <buffer> gG \Gamma
iabbrev <buffer> gH \Theta
iabbrev <buffer> gL \Lambda
iabbrev <buffer> gP \Pi
iabbrev <buffer> gQ \Psi
iabbrev <buffer> gS \Sigma
iabbrev <buffer> gW \Omega

nnoremap <buffer> <LocalLeader>i :VimtexCompile<CR>
nnoremap <buffer> <LocalLeader>e :VimtexErrors<CR>
nnoremap <buffer> <LocalLeader>o :VimtexView<CR>
nnoremap <buffer> <LocalLeader>t :VimtexTocToggle<CR>
nnoremap <buffer> <LocalLeader>h :split header.sty<CR>
nnoremap <buffer> <LocalLeader>d :!latexdiff-git main_old.tex main.tex > diff.tex<CR>