1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

vim: add tagbar, nerdtree & various latex configuration

This commit is contained in:
Joe Groocock 2018-03-29 16:00:15 +01:00
parent 761c84863e
commit e294810914
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -71,14 +71,17 @@ call vundle#rc('~/.config/vim/bundle')
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-sensible'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-rhubarb'
Plugin 'tpope/vim-abolish'
Plugin 'majutsushi/tagbar'
Plugin 'airblade/vim-gitgutter'
Plugin 'ryanoasis/vim-devicons'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'chr4/nginx.vim'
Plugin 'PotatoesMaster/i3-vim-syntax'
Plugin 'lervag/vimtex'
Plugin 'JamshedVesuna/vim-markdown-preview'
@ -90,6 +93,15 @@ let g:use_dvorak = 1
" YouCompleteMe config
let g:ycm_confirm_extra_conf = 0
if !exists('g:ycm_semantic_triggers')
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme
"let g:vimtex_view_method='zathura'
let g:tex_flavor='latex'
autocmd FileType tex silent VimtexCompile
autocmd FileType tex setlocal spell
autocmd FileType tex TagbarOpen
" Vim-Airline config
let g:Powerline_symbols = 'fancy'
@ -103,6 +115,20 @@ let vim_markdown_preview_browser='Chromium'
let vim_markdown_preview_use_xdg_open=1
let vim_markdown_preview_github=1
" Syntastic configuration
let g:syntastic_enable_highlighting = 1
let g:syntastic_enable_signs=1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Tagbar configuration
let g:tagbar_width = 50
let g:tagbar_compact = 1
let g:tagbar_show_linenumbers = 1
let g:tagbar_singleclick = 1
let g:tagbar_autopreview = 1
" Disable mouse
set mouse=nicr
@ -121,6 +147,10 @@ for prefix in ['n', 'v']
endfor
endfor
" Source: https://github.com/ChrisLane/dotfiles/blob/1f5efd44e1b78224568645eaec2e6e243959c0a9/.vimrc#L66
" Remove whitespace at end of lines with F5
:nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
" Dvorak Hackery
" Source: https://github.com/sporkbox/vimrc/blob/master/vimrc
if (exists("g:use_dvorak") && g:use_dvorak == 1)
@ -210,5 +240,3 @@ cmap w!! w !sudo tee > /dev/null %
autocmd FileType markdown setlocal ts=2 sts=2 sw=2 et
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 et
autocmd FileType tex silent VimtexCompile
autocmd FileType tex setlocal spell