summaryrefslogtreecommitdiff
path: root/nvim/after/ftplugin/tex/mappings.vim
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-05-18 15:05:59 +0100
committerUrbain Vaes <urbain@vaes.uk>2015-05-18 15:05:59 +0100
commitd2d3900ea28d1bd2a86238e9c16d142d07ec7e45 (patch)
treea7aeef2a9cca2de8be3e77c3116d4b332a088ef7 /nvim/after/ftplugin/tex/mappings.vim
parent96f53af4ab7b853034c4570ba7f21e2bac10dcbf (diff)
added .nvim with configuration
Diffstat (limited to 'nvim/after/ftplugin/tex/mappings.vim')
-rw-r--r--nvim/after/ftplugin/tex/mappings.vim50
1 files changed, 50 insertions, 0 deletions
diff --git a/nvim/after/ftplugin/tex/mappings.vim b/nvim/after/ftplugin/tex/mappings.vim
new file mode 100644
index 0000000..a8753bb
--- /dev/null
+++ b/nvim/after/ftplugin/tex/mappings.vim
@@ -0,0 +1,50 @@
+inoremap <buffer> (( \left(
+inoremap <buffer> )) \right)
+inoremap <buffer> {{ \left\{
+inoremap <buffer> }} \right\}
+inoremap <buffer> [[ \left[
+inoremap <buffer> ]] \right]
+inoremap <buffer> == \,=\,
+inoremap <buffer> >> \,\geq\,
+inoremap <buffer> << \,\leq\,
+inoremap <buffer> ++ \,+\,
+inoremap <buffer> -- \,-\,
+
+iabbrev <buffer> ga \alpha
+iabbrev <buffer> gb \beta
+iabbrev <buffer> gg \gamma
+iabbrev <buffer> gd \delta
+iabbrev <buffer> ge \varepsilon
+iabbrev <buffer> gz \zeta
+iabbrev <buffer> gh \eta
+iabbrev <buffer> gt \theta
+iabbrev <buffer> gi \iota
+iabbrev <buffer> gk \kappa
+iabbrev <buffer> gl \lambda
+iabbrev <buffer> gm \mu
+iabbrev <buffer> gn \nu
+iabbrev <buffer> gx \xi
+iabbrev <buffer> gr \rho
+iabbrev <buffer> gs \sigma
+iabbrev <buffer> gf \phi
+iabbrev <buffer> gp \pi
+iabbrev <buffer> gw \omega
+iabbrev <buffer> dd \d
+
+function! SynctexShow()
+ let synctex = glob("*.synctex.gz")
+ if strlen(synctex) == 0
+ echom "no synctex file found"
+ else
+ let pdffile = substitute(synctex,"synctex.gz","pdf","")
+ let execline = printf(":!zathura --synctex-forward %d:%d:%s %s", line('.'), col('.'), shellescape(bufname("%")), shellescape(pdffile))
+ exec execline
+ end
+endfunction
+
+nnoremap <buffer> <LocalLeader>a :call SynctexShow()<CR><CR>
+nnoremap <buffer> <LocalLeader>i :Latexmk<CR>
+nnoremap <buffer> <LocalLeader>e :LatexErrors<CR>
+nnoremap <buffer> <LocalLeader>o :LatexView<CR>
+nnoremap <buffer> <LocalLeader>k :LatexmkStop<CR>:LatexmkClean<CR>
+nnoremap <buffer> <LocalLeader>h :split header.sty<CR>