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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
| set nocompatible
set backspace=eol,start,indent
set autoindent
set cindent
set number
" 高亮显示搜索内容
set hlsearch
" 忽略大小写
set ignorecase
" 输入时显示搜索内容
set incsearch
" 256 color
set t_Co=256
set shiftwidth=4
set softtabstop=4
set noexpandtab
set tabstop=4
set nowrap
" 记住上次退出位置 =====================
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" 记住上次退出位置 end==================
let g:GtagsCscope_Auto_Map = 1
let g:Gtags_Auto_Map = 1
" gutentags_plus vim-gutentags=======================================================
let g:gutentags_modules = []
"if executable('ctags')
" let g:gutentags_modules += ['ctags']
"endif
if executable('gtags-cscope') && executable('gtags')
let g:gutentags_modules += ['gtags_cscope']
endif
" config project root markers.
let g:gutentags_project_root = ['.root']
let g:gutentags_ctags_tagfile = '.tags'
if exists('g:gutentags_cache_dir') == 0
let g:gutentags_cache_dir = expand('~/.cache/tags')
endif
if !isdirectory(g:gutentags_cache_dir)
call mkdir(g:gutentags_cache_dir, 'p')
endif
let g:gutentags_ctags_extra_args = []
let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extra=+q']
let g:gutentags_ctags_extra_args += ['--c++-kinds=+px']
let g:gutentags_ctags_extra_args += ['--c-kinds=+px']
let g:gutentags_auto_add_gtags_cscope = 0
let g:gutentags_define_advanced_commands = 1
if has('win32') || has('win16') || has('win64') || has('win95')
let g:gutentags_ctags_extra_args += ['--output-format=e-ctags']
endif
" generate datebases in my cache directory, prevent gtags files polluting my project
let g:gutentags_cache_dir = expand('~/.cache/tags')
" change focus to quickfix window after search (optional).
let g:gutentags_plus_switch = 1
" let $GTAGSLABEL='native'
" =================================end==============================================
" Leaderf start================
let g:Lf_PreviewInPopup = 1
let g:Lf_WindowPosition = 'popup'
noremap <C-r> :LeaderfFunction<CR>
" Leaderf end ================
" lightline plug start ====================
set laststatus=2
" lightline plug end ====================
call plug#begin()
" gutentags plug start=================
Plug 'skywind3000/gutentags_plus'
Plug 'ludovicchabant/vim-gutentags'
" =====================================
Plug 'itchyny/lightline.vim'
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }
" vim lsp plug
" Plug 'prabirshrestha/vim-lsp'
"Plug 'autozimu/LanguageClient-neovim', {
" \ 'branch': 'next',
" \ 'do': 'bash install.sh',
" \ }
call plug#end()
|