forked from mariokonrad/marnav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.local
68 lines (61 loc) · 2.11 KB
/
.vimrc.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
" This local vim configuration assumes the build directory be in the root
" of the source tree named 'build'
"
" This just my personal preference for normal day-to-day development of this project.
" clang-format
map <C-f> :py3f /usr/share/vim/addons/syntax/clang-format-10.py<CR>
imap <C-f> <ESC>:py3f /usr/share/vim/addons/syntax/clang-format-10.py<CR>i
map <leader>fm ggVG :py3f /usr/share/vim/addons/syntax/clang-format-10.py<CR>
" grepping
map <F4> :grep -Ernw --include=*.c* --include=*.h* <cword> src include test examples <Bar> cw<CR>
" tags
set tags+=.ctags/tags,build/tags
" path
set path+=**
" cctree command
command! CTL silent CCTreeLoadDB build/cscope.out
" youcompleteme
let g:ycm_autoclose_preview_window_after_completion=1
let g:ycm_autoclose_preview_window_after_insertion=1
let g:ycm_confirm_extra_conf=0
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_check_on_open=1
let g:syntastic_enable_signs=1
let g:ycm_clangd_uses_ycmd_caching=0
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
let g:ycm_clangdbinary_path = exepath("clangd")
" gutentatgs
let g:gutentags_enabled = 1
let g:gutentags_modules = ['ctags'] "['ctags', 'cscope']
let g:gutentags_project_root = ['.git']
let g:gutentags_add_default_project_roots = 0
let g:gutentags_ctags_extra_args = [
\'--c++-kinds=+p',
\'--tag-relative=yes',
\'--fields=+ailmnS'
\]
let g:gutentags_generate_on_new = 1
let g:gutentags_generate_on_missing = 1
let g:gutentags_generate_on_write = 1
let g:gutentags_generate_on_empty_buffer = 1
let g:gutentags_ctags_exclude = [
\'build/**',
\'extern/**',
\'cmake/**',
\'bin/**',
\'.git/**',
\'.ctags/**',
\'CMakeLists.txt',
\'tags',
\'*cscope*',
\'*.cmake',
\'*.md',
\'*.tar.gz',
\'*.in'
\'*.py'
\]
let g:gutentags_auto_add_cscope = 1
let g:gutentags_cscope_build_inverted_index = 1
let g:gutentags_cache_dir = fnamemodify(resolve(expand('<sfile>:p')), ':h') .'/.ctags'
let g:gutentags_ctags_tagfile = fnamemodify(resolve(expand('<sfile>:p')), ':h') .'/.ctags/tags'
let g:gutentags_scopefile = fnamemodify(resolve(expand('<sfile>:p')), ':h') .'/.ctags/cscope.out'