diff options
Diffstat (limited to '.vim/ftplugin/tex.vim')
-rw-r--r-- | .vim/ftplugin/tex.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.vim/ftplugin/tex.vim b/.vim/ftplugin/tex.vim new file mode 100644 index 0000000..a218cc7 --- /dev/null +++ b/.vim/ftplugin/tex.vim @@ -0,0 +1,24 @@ +" some general options + set ai " autoindent + set et " expandtab + set ts=2 " tabstop + set tw=85 " textwidth + +" compile tex-files with latex + set makeprg=latex\ % + +" Inserting pairs of quotes: + imap Y" ``''<Left><Left> + +" Some mappings for often used commands + iab ,b \begin{}<Esc>i + iab ,e \end{}<Esc>i + +" A mapping for more effective use of latex compiling + map <F7> : call CompileRunPDF()<CR> + func! CompileRunPDF() + exec "w" + exec "!latex % && dvipdf %<.dvi && xpdf %<.pdf" + exec "i" + endfunc + |