Browse Source

Improve latex/tex support in vim

Emmanuel Bouthenot 8 years ago
parent
commit
486d8117c4
1 changed files with 11 additions and 2 deletions
  1. 11 2
      .vimrc

+ 11 - 2
.vimrc

@@ -29,6 +29,7 @@ Plug 'editorconfig/editorconfig-vim'
 Plug 'godlygeek/tabular'
 Plug 'plasticboy/vim-markdown'
 Plug 'pearofducks/ansible-vim'
+Plug 'LaTeX-Box-Team/LaTeX-Box'
 Plug 'http://git.openics.org/kolter/vim-bindzone.git'
 call plug#end()
 " }}}
@@ -203,9 +204,8 @@ set infercase "smart case support
 
 " {{{ Code folding
 set foldmethod=indent   "fold based on indent
-set foldnestmax=10      "deepest fold is 10 levels
 set nofoldenable        "dont fold by default
-set foldlevel=1
+set foldlevel=0
 " }}}
 
 " {{{ Email Settings
@@ -291,4 +291,13 @@ let g:airline#extensions#tabline#enabled=1
 nmap <F8> :TagbarToggle<CR>
 " }}}
 
+" {{{ Latex settings
+let g:tex_conceal = ""
+let g:LatexBox_Folding = 1
+
+if has('autocmd')
+    autocmd FileType tex set foldlevel=0 foldenable
+endif
+" }}}
+
 " vim: foldmethod=marker foldlevel=0 foldenable