|
|
@ -29,6 +29,13 @@ if has("autocmd") |
|
|
|
filetype plugin indent on |
|
|
|
endif |
|
|
|
|
|
|
|
" Use plugin manager if available |
|
|
|
if (filereadable($HOME."/.vim/autoload/plug.vim")) || (filereadable("/usr/share/vim/vimfiles/autoload/plug.vim")) |
|
|
|
let g:use_pluggin_manager = 1 |
|
|
|
else |
|
|
|
let g:use_pluggin_manager = 0 |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
@ -165,15 +172,24 @@ function! LazyLoadingYMC() |
|
|
|
call plug#load('YouCompleteMe') | call youcompleteme#Enable() |
|
|
|
endif |
|
|
|
endfunction |
|
|
|
autocmd BufRead * call timer_start(1, {id->execute('call LazyLoadingYMC()')} ) |
|
|
|
" (also try BufWinEnter, InsertEnter, or CursorHold and CursorHoldI events) |
|
|
|
if g:use_pluggin_manager == 1 |
|
|
|
autocmd BufRead * call timer_start(1, {id->execute('call LazyLoadingYMC()')} ) |
|
|
|
" (also try BufWinEnter, InsertEnter, or CursorHold and CursorHoldI events) |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
" Enable vimtex completions for YCM |
|
|
|
if !exists('g:ycm_semantic_triggers') |
|
|
|
let g:ycm_semantic_triggers = {} |
|
|
|
function! VimtexYCMSetup() |
|
|
|
if !exists('g:ycm_semantic_triggers') |
|
|
|
let g:ycm_semantic_triggers = {} |
|
|
|
endif |
|
|
|
if exists('g:vimtex#re#youcompleteme') |
|
|
|
let g:ycm_semantic_triggers.tex=g:vimtex#re#youcompleteme |
|
|
|
endif |
|
|
|
endfunction |
|
|
|
if has("autocmd") |
|
|
|
autocmd VimEnter * call VimtexYCMSetup() |
|
|
|
endif |
|
|
|
autocmd VimEnter * let g:ycm_semantic_triggers.tex=g:vimtex#re#youcompleteme |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -184,21 +200,24 @@ autocmd VimEnter * let g:ycm_semantic_triggers.tex=g:vimtex#re#youcompleteme |
|
|
|
|
|
|
|
" Use with :PlugInstall and :PlugUpdate |
|
|
|
|
|
|
|
" Set custom plugin directory |
|
|
|
call plug#begin('~/.vim/vim-plug') |
|
|
|
|
|
|
|
Plug 'ycm-core/YouCompleteMe', { 'do': function('BuildYCM'), 'on': [] } |
|
|
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } |
|
|
|
Plug 'dense-analysis/ale' |
|
|
|
Plug 'airblade/vim-gitgutter' |
|
|
|
Plug 'godlygeek/tabular' |
|
|
|
Plug 'tpope/vim-surround' |
|
|
|
Plug 'tpope/vim-unimpaired' |
|
|
|
Plug 'tpope/vim-speeddating' |
|
|
|
Plug 'tpope/vim-repeat' |
|
|
|
Plug 'lervag/vimtex' |
|
|
|
|
|
|
|
call plug#end() |
|
|
|
"if exists('g:use_pluggin_manager') && g:use_pluggin_manager |
|
|
|
if g:use_pluggin_manager == 1 |
|
|
|
" Set custom plugin directory |
|
|
|
call plug#begin('~/.vim/vim-plug') |
|
|
|
|
|
|
|
Plug 'ycm-core/YouCompleteMe', { 'do': function('BuildYCM'), 'on': [] } |
|
|
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } |
|
|
|
Plug 'dense-analysis/ale' |
|
|
|
Plug 'airblade/vim-gitgutter' |
|
|
|
Plug 'godlygeek/tabular' |
|
|
|
Plug 'tpope/vim-surround' |
|
|
|
Plug 'tpope/vim-unimpaired' |
|
|
|
Plug 'tpope/vim-speeddating' |
|
|
|
Plug 'tpope/vim-repeat' |
|
|
|
Plug 'lervag/vimtex' |
|
|
|
|
|
|
|
call plug#end() |
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|