-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimprj.slurm
71 lines (60 loc) · 2.51 KB
/
.vimprj.slurm
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
69
70
71
"
" Project configuration
"
" Build: command to be run
set makeprg=bear\ --append\ -o\ ./compile_commands.json\ make\ -O\ -C\ ../build\ -j6\ cscope\ install\ install-contrib
" each project can define its headers extension (.h or .hpp)
let g:cpp_header_ext='h'
set noexpandtab
set softtabstop=8
set tabstop=8
set shiftwidth=8
set textwidth=80
set cinoptions=t0 " don't outdent function return types
set cinoptions+=:0 " no extra indentation for case labels
set cinoptions+=g0 " no extra indentation for "public", "protected", "private" labels
set cinoptions+=(0 " line up function args
set formatoptions=croqlnt " c: autowrap comments on textwidth
" r: autoinsert comment leader on <Enter>
" o: autoinsert comment leader on <o> or <O>
" q: allow formatting of comments with gq
" l: long lines are not broken in insert mode
" n: recognize numbered lists
" t: autowrap using textwidth
set copyindent " use previous indent
au FileType vim,vimwiki,c,cpp
\ set textwidth=80 |
\ set formatoptions=ronj
" Tags and CScope: used autocomplete and code search
"set tags =.vimprj.tag
"set tags+=/usr/local/include/boost/.tag
" cscope add .vimprj.cscope
cscope add ../build/cscope.out
" cscope add /usr/local/etc/ctags/qt/5.7.cscope
" Paths: file search
set path+=$PWD/**
" set path+=$PWD/../build
"set path+=modules
"set path+=.,/usr/local/include,/usr/include
" Man: documentation
"let $MANPATH='doc/man:'
" Autocmds: actions to be done in background
let g:myvimprj = 'true' " this line is mandatory if you add commands
augroup myvimprj
"
" Tags creation
"
" autocmd BufWritePost * :Start! ctags-exuberant -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ --tag-relative=no -f .vimprj.tag include/
"
" Add cscope db
"
autocmd ShellCmdPost * :cscope reset
"cscope -b -k -R; cscope-indexer -r -v
" autocmd BufWritePost * :Start! cscope -b -R -f .vimprj.cscope -s ./
" autocmd BufWritePost * :cs kill .vimprj.cscope
" autocmd BufWritePost * :cs add .vimprj.cscope
" autocmd BufWritePost * :Start! cscope -b -R -f .vimprj.cscope -s slurm/ | cs kill .vimprj.cscope | :cs add .vimprj.cscope
" autocmd BufWritePost * :Start! cscope -b -R -f .vimprj.cscope
" autocmd BufWritePost * :cs kill .vimprj.cscope
" autocmd BufWritePost * :cs add .vimprj.cscope
augroup END