-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc.full
123 lines (121 loc) · 3.77 KB
/
.vimrc.full
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Lokaltog/vim-powerline'
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'Yggdroot/indentLine'
Plugin 'derekwyatt/vim-fswitch'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'scrooloose/nerdcommenter'
Plugin 'vim-scripts/DrawIt'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'Valloric/YouCompleteMe'
Plugin 'derekwyatt/vim-protodef'
Plugin 'scrooloose/nerdtree'
Plugin 'fholgado/minibufexpl.vim'
Plugin 'gcmt/wildfire.vim'
Plugin 'Lokaltog/vim-easymotion'
Plugin 'yegappan/grep'
Plugin 'mileszs/ack.vim'
Plugin 'dyng/ctrlsf.vim'
call vundle#end()
filetype plugin indent on
" set the value of <leader>
let mapleader=";"
set incsearch
set ignorecase
set nocompatible
set backspace=indent,eol,start
" enable intelligent completion of vim command-line
set wildmenu
" enable status bar
set laststatus=2
" displays the current position of the cursor
set ruler
" enable line number
set number
" highlight cursor line
" set cursorline
" highlight cursor colum
" set cursorcolumn
" highlight search results
set hlsearch
" disable cursor flicker
set gcr=a:block-blinkon0
set nowrap
" set gvim font
set guifont=YaHei\ Consolas\ Hybrid\ 11.5
syntax enable
syntax on
" switch split screens in insert mode
imap <C-W> <Esc><C-W>
" indent setting
" expanding tab to multi spaces
set expandtab
" the length (number of spaces) of a tab while editing
set tabstop=4
" the length (number of spaces) of a tab while formatting
set shiftwidth=4
" consider a continuous number of Spaces as a TAB character
set softtabstop=4
" fold setting
set foldmethod=indent
" set foldmethod=syntax
" unfold when starting vim
set nofoldenable
" vim-fswitch setting
nmap <silent> <Leader>sw :FSHere<cr>
" ctrlsf setting
nnoremap <Leader>sp :CtrlSF<CR>
" UltiSnips setting
let g:UltiSnipsExpandTrigger="<leader><tab>"
let g:UltiSnipsJumpForwardTrigger="<leader><tab>"
let g:UltiSnipsJumpBackwardTrigger="<leader><s-tab>"
" ycm setting
let g:ycm_complete_in_comments=1
" specifies a fallback path to a config file which is used if no .ycm_extra_conf.py is found
" TODO: comment or modify this line once you have a .ycm_extra_conf.py or compile_commands.json
let g:ycm_global_ycm_extra_conf='$HOME/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
" allow vim to load the.ycm_extra_conf.py file without prompting
let g:ycm_confirm_extra_conf=0
" shortcut for OmniCppComplete engine
inoremap <leader>c <C-x><C-o>
" the completion content does not appear as a sub-window, but only as a completion list
set completeopt-=preview
let g:ycm_add_preview_to_completeopt=0
" list the matches from the first character
let g:ycm_min_num_of_chars_for_completion=1
" disable cache the matches
let g:ycm_cache_omnifunc=0
" syntax keyword completion
let g:ycm_seed_identifiers_with_syntax=1
nnoremap <leader>gt :YcmCompleter GoTo<CR>
nnoremap <leader>gc :YcmCompleter GoToDeclaration<CR>
nnoremap <leader>gd :YcmCompleter GoToDefinition<CR>
" protodef setting
" the path of pullproto.pl
let g:protodefprotogetter='$HOME/.vim/bundle/vim-protodef/pullproto.pl'
" keep the order between declaration and defination
let g:disable_protodef_sorting=1
" NERDtree setting
nmap <Leader>fl :NERDTreeToggle<CR>
let NERDTreeWinSize=32
let NERDTreeWinPos="right"
let NERDTreeShowHidden=1
" disable redundant help information in NERDtree subwindow
let NERDTreeMinimalUI=1
" remove corresponding buffer while the file removed
let NERDTreeAutoDeleteBuffer=1
" MiniBufExplorer setting
map <Leader>bl :MBEToggle<cr>
map <Leader>bn :MBEbn<cr>
map <Leader>bp :MBEbp<cr>
" wildfire setting
map <SPACE> <Plug>(wildfire-fuel)
vmap <S-SPACE> <Plug>(wildfire-water)
let g:wildfire_objects = ["i'", 'i"', "i)", "i]", "i}", "i>", "ip"]
"indent-line setting"
let g:indentLine_char='|'
let g:indentLine_enabled=1