From e294810914ff49898c5935201d0e0d41824e710f Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Thu, 29 Mar 2018 16:00:15 +0100 Subject: [PATCH] vim: add tagbar, nerdtree & various latex configuration --- .config/vim/vimrc | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 97236e9..58dc008 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -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 :let _s=@/ :%s/\s\+$//e :let @/=_s :nohl :unlet _s + " 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