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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
| filetype plugin indent on set helplang=cn set mouse=a set selection=exclusive set selectmode=mouse,key set backspace=indent,eol,start set backspace=2
set number "set nowrap "取消自动换行:一行就一行,别弄到第二行去 syn on set cursorline set showmatch set matchtime=2
set tabstop=4 set softtabstop=4 set shiftwidth=4 set autoindent set smartindent
set foldenable
set foldmethod=syntax
set ignorecase set hlsearch
set ignorecase set incsearch set smartcase
set ruler set showcmd set cmdheight=1 set laststatus=2 set sidescroll=10 set whichwrap=b,s,<,>,[,] set fileformats=unix,dos
"if filereadable(expand("~/.vimplug
call plug#begin('~/.vim/plugged')
Plug 'VundleVim/Vundle.vim'
Plug 'tpope/vim-fugitive'
Plug 'git://git.wincent.com/command-t.git'
Plug 'rstacruz/sparkup', {'rtp': 'vim/'}
Plug 'christoomey/vim-run-interactive'
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes'
Plug 'ycm-core/YouCompleteMe' let g:ycm_global_ycm_extra_conf='~/.vim/plugged/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py' let g:ycm_add_preview_to_completeopt = 0 let g:ycm_show_diagnostics_ui = 0 let g:ycm_server_log_level = 'info' let g:ycm_min_num_identifier_candidate_chars = 2 let g:ycm_collect_identifiers_from_comments_and_strings = 1 let g:ycm_complete_in_strings=1 let g:ycm_key_invoke_completion = '<c-z>' noremap <c-z> <NOP> set completeopt=menu,menuone
highlight PMenu ctermfg=0 ctermbg=242 guifg=black guibg=darkgrey highlight PMenuSel ctermfg=242 ctermbg=8 guifg=darkgrey guibg=black
let g:ycm_semantic_triggers = { \ 'c,cpp,python,java,go,erlang,perl': ['re!\w{2}'], \ 'cs,lua,javascript': ['re!\w{2}'], \ }
let g:ycm_filetype_whitelist = { \ "c":1, \ "cpp":1, \ "go":1, \ "python":1, \ "sh":1, \ "zsh":1, \ }
let g:ycm_filetype_blacklist = { \ 'markdown' : 1, \ 'text' : 1, \ 'pandoc' : 1, \ 'infolog' : 1, \}
Plug 'Shougo/echodoc.vim' set noshowmode
Plug 'vim-syntastic/syntastic'
Plug 'octol/vim-cpp-enhanced-highlight' let c_no_curly_error = 1
Plug 'universal-ctags/ctags' Plug 'ludovicchabant/vim-gutentags'
let g:gutentags_project_root = ['.root', '.svn', '.git', '.hg', '.project']
let g:gutentags_ctags_tagfile = '.tags'
let s:vim_tags = expand('~/.cache/tags') let g:gutentags_cache_dir = s:vim_tags
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']
if !isdirectory(s:vim_tags) silent! call mkdir(s:vim_tags, 'p') endif
Plug 'skywind3000/asyncrun.vim'
let g:asyncrun_rootmarks = ['.svn', '.git', '.root', '_darcs', 'build.xml']
let g:asyncrun_open = 6
let g:asyncrun_bell = 1
nnoremap <F10> :call asyncrun#quickfix_toggle(6)<cr>
nnoremap <silent> <F7> :AsyncRun -cwd=<root> make <cr>
Plug 'Shougo/echodoc.vim' set noshowmode
Plug 'tpope/vim-unimpaired'
Plug 'scrooloose/nerdtree'
autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
map <F2> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
Plug 'majutsushi/tagbar'
let g:tagbar_width=35
let g:tagbar_autofocus=1
let g:tagbar_left=0
nmap <F3> :TagbarToggle<CR>
Plug 'ctrlpvim/ctrlp.vim'
let g:ctrlp_map = '<leader>ff' let g:ctrlp_cmd = 'CtrlP'
map <leader>fp :CtrlPMRU<CR> "set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux let g:ctrlp_custom_ignore = { \ 'dir': '\v[\/]\.(git|hg|svn|rvm)$', \ 'file': '\v\.(exe|so|dll|zip|tar|tar.gz)$', \ }
let g:ctrlp_working_path_mode=0 let g:ctrlp_match_window_bottom=1 let g:ctrlp_max_height=15 let g:ctrlp_match_window_reversed=0 let g:ctrlp_mruf_max=500 let g:ctrlp_follow_symlinks=1
call plug#end()
|