From 85b5baef260e770966cdc873a4e8eab05d935b64 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sat, 2 Jan 2010 17:27:44 +0100 Subject: Initial commit of vim config --- .vim/ftplugin/latex.vim | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .vim/ftplugin/latex.vim (limited to '.vim/ftplugin/latex.vim') diff --git a/.vim/ftplugin/latex.vim b/.vim/ftplugin/latex.vim new file mode 100644 index 0000000..a218cc7 --- /dev/null +++ b/.vim/ftplugin/latex.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" ``'' + +" Some mappings for often used commands + iab ,b \begin{}i + iab ,e \end{}i + +" A mapping for more effective use of latex compiling + map : call CompileRunPDF() + func! CompileRunPDF() + exec "w" + exec "!latex % && dvipdf %<.dvi && xpdf %<.pdf" + exec "i" + endfunc + -- cgit v1.2.3-54-g00ecf