mirror of
https://github.com/Hizenberg469/environment-setup.git
synced 2026-04-19 21:12:23 +03:00
complete
This commit is contained in:
62
my_vimrc
62
my_vimrc
@@ -251,6 +251,8 @@ endfunction
|
||||
command! ALEOn call s:ALEEnable()
|
||||
command! ALEOff call s:ALEDisable()
|
||||
|
||||
" Codequery
|
||||
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
function! s:CodeQueryEnable() abort
|
||||
silent! packadd unite.vim
|
||||
silent! packadd vim-codequery
|
||||
@@ -260,4 +262,64 @@ endfunction
|
||||
|
||||
command! CQOn call s:CodeQueryEnable()
|
||||
|
||||
|
||||
" Gutentags -- Gtags
|
||||
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
function! GutenTagsEnable() abort
|
||||
|
||||
"let g:gutentags_file_list_command = 'find tj100_mc/ modules/ce/ modules/ethCommon/ modules/ethTransport/ common/ -type f \( -name "*.[ch]" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.js" -o -name "*.pl" -o -name "*.sh"\)'
|
||||
|
||||
"let g:gutentags_ctags_extra_args = [
|
||||
" \'--language=C,C++,Javascript,Perl,Sh',
|
||||
" \'--langmap=C:+.c.h',
|
||||
" \'--langmap=C++:+.cpp.hpp.cc.hh',
|
||||
" \'--langmap=Javascript:+.js',
|
||||
" \'--langmap=Perl:+.pl.pm',
|
||||
" \'--langmap=Sh:+.sh',
|
||||
" \'--langmap=mib:+.mib'
|
||||
" \]
|
||||
|
||||
" For ctags and gtags_plus configuration
|
||||
" enable gtags module
|
||||
let g:gutentags_modules = ['ctags', 'gtags_cscope']
|
||||
|
||||
" config project root markers.
|
||||
let g:gutentags_add_default_project_roots = 0
|
||||
let g:gutentags_project_roots = ['.root']
|
||||
|
||||
" Put the ctags file in <project>/.root/tags (path is relative to project root)
|
||||
let g:gutentags_ctags_tagfile = expand('$PWD/.root/tags')
|
||||
|
||||
" Store GNU Global (gtags) databases under <project>/.root/ (instead of ~/.cache/tags)
|
||||
let g:gutentags_cache_dir = expand('$PWD/.root')
|
||||
|
||||
" To let gutentag_plus manage the connection with gtags instead of gutentags.
|
||||
"let g:gutentags_auto_add_gtags_cscope = 1
|
||||
|
||||
let g:gutentags_define_advanced_commnads = 1
|
||||
|
||||
" change focus to quickfix window after search (optional).
|
||||
let g:gutentags_plus_switch = 1
|
||||
let g:gutentags_plus_nomap = 1
|
||||
noremap <silent> <leader>css :GscopeFind s <C-R><C-W><cr>
|
||||
noremap <silent> <leader>csg :GscopeFind g <C-R><C-W><cr>
|
||||
noremap <silent> <leader>csc :GscopeFind c <C-R><C-W><cr>
|
||||
noremap <silent> <leader>cst :GscopeFind t <C-R><C-W><cr>
|
||||
noremap <silent> <leader>cse :GscopeFind e <C-R><C-W><cr>
|
||||
noremap <silent> <leader>csf :GscopeFind f <C-R><C-W><cr>
|
||||
noremap <silent> <leader>csi :GscopeFind i <C-R>=expand("<cfile>")<cr><cr>
|
||||
noremap <silent> <leader>csd :GscopeFind d <C-R>=expand("<cfile>")<cr><cr>
|
||||
noremap <silent> <leader>csa :GscopeFind a <C-R><C-W><cr>
|
||||
noremap <silent> <leader>csz :GscopeFind z <C-R><C-W><cr>
|
||||
echo "Gutentags + Plus enabled"
|
||||
endfunction
|
||||
|
||||
function! s:GTagsDisable() abort
|
||||
let g:gutentags_enabled = 0
|
||||
|
||||
if exists(':GscopeKill') | silent! GscopeKill | endif
|
||||
|
||||
echo "Gutentags disabled"
|
||||
endfunction
|
||||
|
||||
" My vimrc end -- Hizenberg
|
||||
|
||||
Reference in New Issue
Block a user