From 5a4e2ef33524e19a857709226898d84c4cc95fe5 Mon Sep 17 00:00:00 2001 From: Jannik Zander <59698@grundfos.com> Date: Mon, 6 Aug 2018 14:07:20 +0200 Subject: [PATCH] Load gtags when available --- .gitmodules | 3 +++ pack/async/opt/gen_tags.vim | 1 + vimrc | 16 ++++++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) create mode 160000 pack/async/opt/gen_tags.vim diff --git a/.gitmodules b/.gitmodules index 709292e..5a237b9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -85,3 +85,6 @@ [submodule "pack/shougo/start/vim-hug-neovim-rpc"] path = pack/shougo/opt/vim-hug-neovim-rpc url = https://github.com/roxma/vim-hug-neovim-rpc.git +[submodule "pack/async/start/gen_tags.vim"] + path = pack/async/opt/gen_tags.vim + url = https://github.com/jsfaint/gen_tags.vim.git diff --git a/pack/async/opt/gen_tags.vim b/pack/async/opt/gen_tags.vim new file mode 160000 index 0000000..6a12af0 --- /dev/null +++ b/pack/async/opt/gen_tags.vim @@ -0,0 +1 @@ +Subproject commit 6a12af043a0790b4678c18e950f71d05d58048fb diff --git a/vimrc b/vimrc index 14d0f85..a591b98 100644 --- a/vimrc +++ b/vimrc @@ -1,4 +1,4 @@ -" Use :help 'option' to see the documentation for the given option. +;" Use :help 'option' to see the documentation for the given option. set nocompatible filetype plugin indent on syntax on @@ -114,7 +114,7 @@ match BadWhitespace /\s\+$/ " fonts and chars set list if has('multi_byte') && &encoding ==# 'utf-8' - let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±' + let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±' else let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.' endif @@ -208,7 +208,7 @@ if has('autocmd') augroup filetypes autocmd! - autocmd bufnewfile,bufread *.md,*.txt set filetype=pandoc + autocmd bufnewfile,bufread *.md set filetype=pandoc autocmd bufnewfile,bufread *.gradle set filetype=groovy autocmd bufnewfile,bufread *.json set filetype=json autocmd bufnewfile,bufread *.yml set filetype=yaml @@ -216,7 +216,7 @@ if has('autocmd') augroup saveall autocmd! - autocmd focuslost * wall + autocmd focuslost * silent! wa augroup end augroup numbers @@ -252,14 +252,18 @@ let g:airline#extensions#ale#enabled = 1 packadd! tagbar " Gtags-Cscope -set csprg=gtags-cscope -set cscopetag +if executable('global') +packadd! gen_tags.vim let GtagsCscope_Auto_Map = 1 let GtagsCscope_Ignore_Case = 1 let GtagsCscope_Absolute_Path = 1 let GtagsCscope_Keep_Alive = 1 let GtagsCscope_Auto_Load = 1 let GtagsCscope_Quiet = 1 +set csprg=gtags-cscope +set cscopetag +endif + " Async shell commands packadd asyncrun.vim -- 2.43.0