summaryrefslogtreecommitdiff
path: root/.vim/ftplugin/tex.vim
blob: a218cc7f95e3466231c5df4292defa6bf2548e33 (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
" 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