├── .vimrc ├── README.md ├── install.sh └── screenshots └── secure-screen-blink.png /.vimrc: -------------------------------------------------------------------------------- 1 | " Disable Vi compatibility 2 | set nocompatible 3 | colorscheme default 4 | 5 | "set list 6 | "set listchars=tab:.\ 7 | "set listchars+=trail:▸ 8 | "set listchars+=nbsp:_ 9 | "set listchars+=eol:¬ 10 | 11 | set textwidth=120 12 | " set line number 13 | set number 14 | set autoread 15 | set clipboard=unnamed 16 | " Minimal number of screen lines to keep above and below the cursor. 17 | set scrolloff=5 18 | " allow some key to move accross line(loop just like a circle) ,b: " s: 19 | set whichwrap=b,s,>,<,[,] 20 | " turn off the error tip bell 21 | set noerrorbells 22 | " auto change current directory when execute ':vsp',':e' ,etc.. 23 | "set autochdir 24 | " used for count of tab expand spaces(when type in 'i' mod w) 25 | set tabstop=4 26 | " used for count of tab expand spaces(when type << ,>> in 'n' mod w) 27 | set shiftwidth=4 28 | set softtabstop=4 29 | " set extra line break except for the \n and reaching end of line 30 | set linebreak 31 | " show the match pair 32 | set showmatch 33 | " autoindent let the next line(when type in the i mod) indent same as 34 | " prev line 35 | set autoindent 36 | " autoindent more,such as 'if','else','{','}' will add one extra indent to next line 37 | set smartindent 38 | set backspace=indent,eol,start 39 | 40 | " set mouse=a 41 | set guioptions+=a 42 | set expandtab 43 | set formatoptions=tq 44 | 45 | set encoding=utf-8 nobomb 46 | set fileencoding=utf-8 47 | set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1 48 | set termencoding=utf-8 49 | set langmenu=zh_CN.UTF-8 50 | set laststatus=2 51 | set cpt=.,w,b,k,i,t 52 | language message zh_CN.UTF-8 53 | 54 | let mapleader = ',' 55 | 56 | " 打开文件时自动跳到上一次的光标位置 57 | autocmd BufReadPost * 58 | \ if line("'\"")>0&&line("'\"")<=line("$") | 59 | \ exe "normal g'\"" | 60 | \ endif 61 | 62 | if has("cmdline_info") 63 | " Show the cursor line and column number 64 | set ruler 65 | " Show partial commands in status line 66 | set showcmd 67 | " Show whether in insert or replace mode 68 | set showmode 69 | endif 70 | 71 | if has("syntax") 72 | " Enable syntax highlighting 73 | syntax enable 74 | " Set 256 color terminal support 75 | set t_Co=256 76 | " Set dark background 77 | set background=dark 78 | endif 79 | 80 | if has('statusline') 81 | " Always show status line 82 | set laststatus=2 83 | " Broken down into easily includeable segments 84 | " Filename 85 | set statusline=%<%f 86 | " Options 87 | set statusline+=%w%h%m%r 88 | " Current dir 89 | set statusline+=\ [%{getcwd()}] 90 | " Right aligned file nav info 91 | set statusline+=%=%-14.(%l,%c%V%)\ %p%% 92 | endif 93 | 94 | if has("autocmd") 95 | " Load files for specific filetypes 96 | filetype on 97 | filetype indent on 98 | filetype plugin on 99 | endif 100 | 101 | if has("wildmenu") 102 | " Show a list of possible completions 103 | set wildmenu 104 | " Tab autocomplete longest possible part of a string, then list 105 | set wildmode=longest,list 106 | if has ("wildignore") 107 | set wildignore+=*.a,*.pyc,*.o,*.orig 108 | set wildignore+=*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png 109 | set wildignore+=.DS_Store,.git,.hg,.svn 110 | set wildignore+=*~,*.sw?,*.tmp 111 | endif 112 | endif 113 | 114 | if has("extra_search") 115 | " Highlight searches [use :noh to clear] 116 | set hlsearch 117 | " Highlight dynamically as pattern is typed 118 | set incsearch 119 | " Ignore case of searches... 120 | set ignorecase 121 | " unless has mixed case 122 | set smartcase 123 | endif 124 | 125 | " highlight current line 126 | set cursorline 127 | hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white 128 | set colorcolumn=120 129 | hi colorcolumn guifg=darkgreen 130 | 131 | " 更新vimrc时另当前缓冲区全部重加载vimrc 132 | autocmd! BufWritePost .vimrc source ~/.vimrc 133 | autocmd filetype smarty,tpl let &l:filetype='html' 134 | set keywordprg=:help 135 | let s:vimfile = '~/.vim/' 136 | " 多窗口时调整当前窗口的大小 137 | nnoremap 10+ 138 | nnoremap 10- 139 | nnoremap 10< 140 | nnoremap 10> 141 | " 从minibuffer里面移植过来的 142 | noremap j 143 | noremap k 144 | noremap h 145 | noremap l 146 | " 垂直切分某一个buffer,eg:Vb {1/2/3} 147 | command! -nargs=1 -complete=file Vb execute("vertical split ".) 148 | command! -nargs=1 -complete=file Vd execute("vertical diffsplit ".) 149 | cmap w!! %!sudo tee > /dev/null % 150 | 151 | set rtp+=~/.vim/bundle/Vundle.vim 152 | call vundle#begin() 153 | 154 | Bundle 'gmarik/Vundle.vim' 155 | 156 | Bundle 'Emmet.vim' 157 | 158 | Bundle 'dbakker/vim-projectroot' 159 | 160 | Bundle 'Shougo/vimproc.vim' 161 | 162 | Bundle 'Shougo/unite-session' 163 | 164 | Bundle 'Shougo/neoyank.vim' 165 | 166 | Bundle 'Shougo/neomru.vim' 167 | 168 | Bundle 'Shougo/unite.vim' 169 | 170 | Bundle 'Shougo/neocomplcache.vim' 171 | 172 | Bundle 'kien/ctrlp.vim' 173 | map p :CtrlP 174 | map b :CtrlPBuffer 175 | map t :CtrlPTag 176 | let g:ctrlp_switch_buffer = 'Et' 177 | let g:ctrlp_working_path_mode = 'rwa' 178 | let g:ctrlp_open_new_file = 'h' 179 | let g:ctrlp_match_window = 'order:ttb,min:1,max:10,results:20' 180 | let g:ctrlp_root_markers = ['Bootstrap.php','fis-conf.js'] 181 | let g:ctrlp_max_files =0 182 | let g:ctrlp_clear_cache_on_exit = 0 183 | let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript', 'undo', 'line', 184 | \'changes', 'mixed', 'bookmarkdir','funky'] 185 | 186 | Bundle 'tacahiroy/ctrlp-funky', 187 | map f :CtrlPFunky 188 | 189 | " Disable AutoComplPop. 190 | let g:acp_enableAtStartup = 0 191 | " Use neocomplcache. 192 | let g:neocomplcache_enable_at_startup = 1 193 | " Use smartcase. 194 | let g:neocomplcache_enable_smart_case = 1 195 | " Set minimum syntax keyword length. 196 | let g:neocomplcache_min_syntax_length = 3 197 | let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*' 198 | " Define dictionary. 199 | let g:neocomplcache_dictionary_filetype_lists = { 200 | \ 'default' : '', 201 | \ 'vimshell' : $HOME.'/.vimshell_hist', 202 | \ 'scheme' : $HOME.'/.gosh_completions' 203 | \ } 204 | " Define keyword. 205 | if !exists('g:neocomplcache_keyword_patterns') 206 | let g:neocomplcache_keyword_patterns = {} 207 | endif 208 | let g:neocomplcache_keyword_patterns['default'] = '\h\w*' 209 | " Plugin key-mappings. 210 | inoremap neocomplcache#undo_completion() 211 | inoremap neocomplcache#complete_common_string() 212 | " Recommended key-mappings. 213 | " : close popup and save indent. 214 | inoremap =my_cr_function() 215 | function! s:my_cr_function() 216 | return neocomplcache#smart_close_popup() . "\" 217 | " For no inserting key. 218 | "return pumvisible() ? neocomplcache#close_popup() : "\" 219 | endfunction 220 | " : completion. 221 | inoremap pumvisible() ? "\" : "\" 222 | " , : close popup and delete backword char. 223 | inoremap neocomplcache#smart_close_popup()."\" 224 | inoremap neocomplcache#smart_close_popup()."\" 225 | inoremap neocomplcache#close_popup() 226 | inoremap neocomplcache#cancel_popup() 227 | " Enable omni completion. 228 | autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS 229 | autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags 230 | autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS 231 | autocmd FileType python setlocal omnifunc=pythoncomplete#Complete 232 | autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags 233 | if !exists('g:neocomplcache_force_omni_patterns') 234 | let g:neocomplcache_force_omni_patterns = {} 235 | endif 236 | let g:neocomplcache_force_omni_patterns.php = '[^.]->\h\w*\|\h\w*::' 237 | let g:neocomplcache_force_omni_patterns.c = '[^.[:digit:]*]\%(\.\|->\)' 238 | let g:neocomplcache_force_omni_patterns.cpp = '[^.[:digit:]*]\%(\.\|->\)\|\h\w*::' 239 | " For perlomni.vim setting. 240 | " https://github.com/c9s/perlomni.vim 241 | let g:neocomplcache_force_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::' 242 | 243 | Bundle 'jlanzarotta/bufexplorer' 244 | map :ToggleBufExplorer 245 | 246 | Bundle 'scrooloose/nerdtree' 247 | map :NERDTreeToggle 248 | autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif 249 | let g:NERDTreeQuitOnOpen=1 250 | let g:NERDTreeShowHidden=1 251 | 252 | 253 | Bundle "jiangmiao/auto-pairs" 254 | Bundle 'scrooloose/syntastic' 255 | " npm install -g jshint for js syntax check 256 | " npm install -g csslint for css syntax check 257 | 258 | set statusline+=%#warningmsg# 259 | if exists("*SyntasticStatuslineFlag") 260 | set statusline+=%{SyntasticStatuslineFlag()} 261 | endif 262 | set statusline+=%* 263 | let g:syntastic_ignore_files=[".*\.py$"] 264 | let g:syntastic_always_populate_loc_list=1 265 | let g:syntastic_auto_loc_list=1 266 | let g:syntastic_check_on_wq=0 267 | let g:syntastic_enable_balloons = 1 268 | let g:syntastic_loc_list_height = 5 269 | autocmd filetype tpl,html let b:match_words = '<:>,'. 270 | \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . 271 | \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . 272 | \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>,' . 273 | \ '{%if.*%}:{%else.*%}:{%/if%},'. 274 | \ '{%for.*%}:{%/for.*%},'. 275 | \ '{%widget.*%}:{%/widget%},'. 276 | \ '{%block.*%}:{%/block%}' 277 | 278 | Bundle "MarcWeber/vim-addon-mw-utils" 279 | Bundle "tomtom/tlib_vim" 280 | Bundle "garbas/vim-snipmate" 281 | " Optional: 282 | Bundle "honza/vim-snippets" 283 | let g:UltiSnipsExpandTrigger="" 284 | 285 | Bundle "comments.vim" 286 | 287 | Bundle "tomasr/molokai" 288 | silent! colorscheme molokai 289 | 290 | Bundle 'Valloric/MatchTagAlways' 291 | 292 | Bundle 'DoxygenToolkit.vim' 293 | let g:DoxygenToolkit_briefTag_pre="@Description " 294 | let g:DoxygenToolkit_paramTag_pre="@Param " 295 | let g:DoxygenToolkit_returnTag="@Return " 296 | let g:DoxygenToolkit_authorName="dingrui" 297 | let g:DoxygenToolkit_versionString="" 298 | let g:doxygen_enhanced_color=1 299 | let g:DoxygenToolkit_briefTag_funcName="yes" 300 | map zd :Dox 301 | map za :DoxAuthor 302 | 303 | Bundle "lmule/vim-var_dump" 304 | 305 | call vundle#end() 306 | 307 | call unite#filters#matcher_default#use(['matcher_fuzzy']) 308 | call unite#custom#source('file,grep,line','matchers', 'matcher_fuzzy') 309 | " Set up some custom ignores 310 | call unite#custom#source('file_rec,file_rec/async,file_mru,file,buffer,grep', 311 | \ 'ignore_pattern', join([ 312 | \ '\.git/', 313 | \ '\.svn/', 314 | \ 'git5/.*/review/', 315 | \ 'google/obj/', 316 | \ 'tmp/', 317 | \ '.sass-cache', 318 | \ 'node_modules/', 319 | \ 'bower_components/', 320 | \ 'dist/', 321 | \ '.git5_specs/', 322 | \ '.pyc', 323 | \ ], '\|')) 324 | " Use the rank sorter for everything 325 | " call unite#filters#sorter_default#use(['sorter_rank']) 326 | 327 | 328 | " Map space to the prefix for Unite 329 | nnoremap [unite] 330 | nmap [unite] 331 | 332 | " General fuzzy search 333 | " nnoremap [unite] :Unite 334 | " \ -no-empty -buffer-name=files buffer file_mru bookmark file_rec/async 335 | 336 | " Quick registers 337 | nnoremap [unite]r :Unite -no-empty -buffer-name=register register 338 | 339 | nnoremap [unite]u :Unite -no-empty -buffer-name=buffers file_mru buffer 340 | " Quick buffer and mru 341 | 342 | " Quick yank history 343 | nnoremap [unite]y :Unite -no-empty -quick-match -buffer-name=yanks history/yank 344 | 345 | imap (unite_select_next_line) 346 | " Quick outline 347 | nnoremap [unite]o :Unite -no-empty -buffer-name=outline -vertical outline 348 | 349 | " Quick sessions (projects) 350 | nnoremap [unite]p :UniteWithProjectDir -no-empty -buffer-name=project file_rec:. 351 | 352 | " Quick sources 353 | nnoremap [unite]a :Unite -no-empty -buffer-name=sources source 354 | 355 | " Quick snippet 356 | nnoremap [unite]s :Unite -no-empty -buffer-name=snippets ultisnips 357 | 358 | " Quickly switch lcd 359 | nnoremap [unite]d 360 | \ :Unite -no-empty -buffer-name=change-cwd -default-action=cd directory_mru directory_rec/async 361 | 362 | " Quick file search 363 | nnoremap [unite]f :Unite -no-empty -buffer-name=file_list file_rec/async:=ProjectRootGuess() 364 | 365 | " Quick grep from cwd 366 | nnoremap [unite]g :Unite -no-empty -buffer-name=grep grep:=ProjectRootGuess() 367 | nnoremap [unite]e :Unite -buffer-name=grep grep:=ProjectRootGuess():: 368 | 369 | " Quick help 370 | nnoremap [unite]h :Unite -no-empty -buffer-name=help help 371 | 372 | " Quick line using the word under cursor 373 | " nnoremap [unite]l :UniteWithCursorWord -no-empty -buffer-name=search_file line 374 | 375 | " Quick line 376 | nnoremap [unite]l :Unite -no-empty -buffer-name=search_file line 377 | 378 | " Quick MRU search 379 | nnoremap [unite]m :Unite -no-empty -buffer-name=mru file_mru 380 | 381 | " Quick find 382 | nnoremap [unite]n :Unite -no-empty -buffer-name=find find:. 383 | 384 | " Quick commands 385 | nnoremap [unite]c :Unite -no-empty -buffer-name=commands command 386 | 387 | " Quick bookmarks 388 | nnoremap [unite]b :Unite -no-empty -buffer-name=bookmarks bookmark 389 | 390 | " Fuzzy search from current buffer 391 | " nnoremap [unite]b :UniteWithBufferDir 392 | " \ -no-empty -buffer-name=files -prompt=%\ buffer file_mru bookmark file 393 | 394 | " Quick commands 395 | nnoremap [unite]; :Unite -no-empty -buffer-name=history -default-action=edit history/command command 396 | augroup MyAutoCmd 397 | autocmd! 398 | augroup END 399 | " Custom Unite settings 400 | autocmd MyAutoCmd FileType unite call s:unite_settings() 401 | function! s:unite_settings() 402 | nmap (unite_exit) 403 | " nmap (unite_insert_enter) 404 | " imap (unite_exit) 405 | imap (unite_select_next_line) 406 | imap (unite_select_previous_line) 407 | " imap (unite_insert_leave) 408 | nmap (unite_loop_cursor_down) 409 | nmap (unite_loop_cursor_up) 410 | nmap (unite_loop_cursor_down) 411 | nmap (unite_loop_cursor_up) 412 | imap (unite_choose_action) 413 | imap (unite_insert_leave) 414 | " imap jj (unite_insert_leave) 415 | imap (unite_delete_backward_word) 416 | imap (unite_delete_backward_path) 417 | imap ' (unite_quick_match_default_action) 418 | nmap ' (unite_quick_match_default_action) 419 | nmap (unite_redraw) 420 | imap (unite_redraw) 421 | inoremap unite#do_action('split') 422 | nnoremap unite#do_action('split') 423 | inoremap unite#do_action('vsplit') 424 | nnoremap unite#do_action('vsplit') 425 | 426 | " let unite = unite#get_current_unite() 427 | " if unite.buffer_name =~# '^search' 428 | " nnoremap r unite#do_action('replace') 429 | " else 430 | " nnoremap r unite#do_action('rename') 431 | " endif 432 | " 433 | " nnoremap cd unite#do_action('lcd') 434 | 435 | " Using Ctrl-\ to trigger outline, so close it using the same keystroke 436 | " if unite.buffer_name =~# '^outline' 437 | " imap (unite_exit) 438 | " endif 439 | 440 | " Using Ctrl-/ to trigger line, close it using same keystroke 441 | " if unite.buffer_name =~# '^search_file' 442 | " imap (unite_exit) 443 | " endif 444 | endfunction 445 | 446 | " Start in insert mode 447 | let g:unite_enable_start_insert = 1 448 | 449 | let g:unite_data_directory = "~/.unite" 450 | 451 | " Enable short source name in window 452 | " let g:unite_enable_short_source_names = 1 453 | 454 | " Enable history yank source 455 | let g:unite_source_history_yank_enable = 1 456 | 457 | " Open in bottom right 458 | let g:unite_split_rule = "botright" 459 | 460 | " Shorten the default update date of 500ms 461 | let g:unite_update_time = 200 462 | 463 | let g:unite_source_file_mru_limit = 100 464 | let g:unite_cursor_line_highlight = 'TabLineSel' 465 | " let g:unite_abbr_highlight = 'TabLine' 466 | 467 | let g:unite_source_file_mru_filename_format = ':~:.' 468 | let g:unite_source_file_mru_time_format = '' 469 | if filereadable(expand("~/.vimrc.local")) 470 | source ~/.vimrc.local 471 | endif 472 | 473 | "设置= + - * 前后自动空格 474 | "或者,后面自动添加空格 475 | let g:equ=1 476 | if exists("g:equ") 477 | :inoremap = =EqualSign('=') 478 | :inoremap + =EqualSign('+') 479 | :inoremap - =EqualSign('-') 480 | :inoremap * =EqualSign('*') 481 | :inoremap / =EqualSign('/') 482 | :inoremap > =EqualSign('>') 483 | :inoremap < =EqualSign('<') 484 | :inoremap , , 485 | endif 486 | 487 | function! EqualSign(char) 488 | if a:char =~ '=' && getline('.') =~ ".*(" 489 | return a:char 490 | endif 491 | let ex1 = getline('.')[col('.') - 3] 492 | let ex2 = getline('.')[col('.') - 2] 493 | 494 | if ex1 =~ "[-=+><>\/\*]" 495 | if ex2 !~ "\s" 496 | return "\i".a:char."\" 497 | else 498 | return "\xa".a:char."\" 499 | endif 500 | else 501 | if ex2 !~ "\s" 502 | return "\".a:char."\\a" 503 | else 504 | return a:char."\\a" 505 | endif 506 | endif 507 | endf 508 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # **常用vim插件** 2 | --- 3 | ## 1. What? 4 | 大家使用vim的时候为了方便会加入各种各样的插件,但每次都需要从[github](https://github.com)、[vim-scripts](http://vim-scripts.org/vim/scripts.html)上找,于是乎为了大家方便找了一些常用的vim插件及其配置供大家使用。使用vundles管理插件,一键式安装。 5 | ## 2. PreRequisite 6 | - git 7 | - vim版本:7.3+ 可通过 **vim version** 查看 8 | - npm 9 | - jshint 10 | - csslint 11 | - cscope 12 | ## 3. Installation 13 | 一行shell搞定安装 14 | > `bash -c "$( curl https://raw.githubusercontent.com/lmule/vim/master/install.sh )"` 15 | 16 | ## 4. Feature 17 | ### 4.1 KeyMap 18 | - 界面上有多个窗口时,上、下、左、右四个方向键盘会在横向、纵向放大、缩小 19 | - 界面上有多个窗口时,Ctrl-j、Ctrl-k、Ctrl-h、Ctrl-l会在多窗口间切换(顺序参照vim默认的j、k、h、l) 20 | - 在命令模式下,输入:Vb file 会在竖直方向打开另外一个文件 21 | - 在命令模式下,输入:Vd file 会在竖直方向打开另外一个文件进行diff 22 | ### 4.2 本地自定义快捷键 23 | - 如果不习惯作者的快捷键,可以在HOME目录下新建.vimrc.local自定义快捷键 24 | ### 4.3 Bundles 25 | - Emmet.vim 26 | - https://github.com/vim-scripts/Emmet.vim 27 | - 前身是Zen Coding,通过简写html、js、css标签就可以生成代码。 28 | - 常用快捷键(注意有逗号) 29 | - Ctrl-y, 生成代码 30 | - neocomplcache.vim 31 | - https://github.com/Shougo/neocomplcache.vim 32 | - 自动补全 33 | - 常用快捷键 34 | - Ctrl-n 选择提示层中的下一项 35 | - Ctrl-p 选择提示层中的上一项 36 | - Ctrl-e 取消弹出提示层 37 | - bufexplorer 38 | - https://github.com/jlanzarotta/bufexplorer 39 | - 显示已经打开的buffer列表 40 | - 常用快捷键 41 | - F3 显示已经打开的buffer列表 42 | - nerdtree 43 | - https://github.com/scrooloose/nerdtree 44 | - 打开目录树 45 | - 常用快捷键 46 | - F2 打开目录树 47 | - syntastic 48 | - https://github.com/scrooloose/syntastic 49 | - 语法检查 50 | - vim-snipmate && vim-snippets 51 | - https://github.com/garbas/vim-snipmate 52 | - https://github.com/honza/vim-snippets 53 | - 快速补齐代码片段,比如输入if,按会补齐大括号 54 | - 常用快捷键 55 | - TAB 自动补齐 56 | - comments.vim 57 | - https://github.com/vim-scripts/comments.vim 58 | - 注释代码片段 59 | - 常用快捷键 60 | - Ctrl-c 注释代码片段 61 | - Ctrl-x 取消注释代码片段 62 | - MatchTagAlways 63 | - https://github.com/Valloric/MatchTagAlways 64 | - 总是显示配对的标签 65 | - DoxygenToolkit 66 | - https://github.com/vim-scripts/DoxygenToolkit.vim 67 | - 可以给类、方法等做注释 68 | - 常用快捷键 69 | - ,za 可以注释类,包含作者、时间等 70 | - ,zd 可以注释方法,包含参数、返回值等 71 | - vim-var_dump 72 | - https://github.com/lmule/vim-var_dump 73 | - 打印当前光标所在的变量,目前只适用于php、js 74 | - 常用快捷键 75 | - Ctrl-d 打印当前变量 76 | - unite 77 | - https://github.com/Shougo/unite.vim 78 | - 可以在一个项目中快速浏览文件 79 | - 常用快捷键 80 | - ,e 在当前项目中查找光标所在单词 81 | - ,g 在当前项目中grep 82 | - ,f 在当前项目中模糊查找文件 83 | - ,u 从当前打开的文件或者最近打开的文件列表中查找文件名 84 | - ,l 从当前打开的文件中可以模糊grep 85 | 86 | ## 5. Contributor 87 | - [岳哥](https://github.com/muziqiushan/) 88 | - [斯人](https://github.com/leecade/) 89 | 90 | ## 6. 常见问题 91 | - 有的securecrt颜色方案配置可能会导致屏幕闪烁,看下颜色方案的配置“启用闪烁”是否打钩 92 | 93 | ![image](https://github.com/lmule/vim/raw/master/screenshots/secure-screen-blink.png) 94 | 95 | - `MatchTagAlways unavailable: requires python.` 96 | 97 | 如果出现这个,是因为vim安装的时候没有python扩展,可以通过`vim --version | grep "python"`验证,如果python前面的是'-',那么需要编译的时候需要带python扩展 -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CURRENT_TIME=`date '+%Y-%m-%d-%H-%M-%S'` 4 | # backup files: .vimrc && .vim 5 | if [ -e ~/.vimrc ]; then 6 | echo "backup your .vimrc" 7 | echo -e "this is backup by dingrui on $CURRENT_TIME\n`cat ~/.vimrc`" >~/.vimrc 8 | mv ~/.vimrc{,.$CURRENT_TIME} 9 | #rm ~/.vimrc 10 | fi 11 | if [ -d ~/.vim ]; then 12 | echo "backup your .vim" 13 | echo "this is backup by dingrui on $CURRENT_TIME">>~/.vim/README 14 | mv ~/.vim{,.$CURRENT_TIME} 15 | fi 16 | 17 | # git clone vundle 18 | git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim 19 | git clone https://github.com/lmule/vim.git ~/.vim/vimrc 20 | 21 | # promote the autoload priority of vundle 22 | mkdir -p ~/.vim/autoload 23 | ln -s ~/.vim/bundle/Vundle.vim/autoload/vundle.vim ~/.vim/autoload/vundle.vim 24 | mkdir -p ~/.vim/autoload/vundle 25 | ln -s ~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim ~/.vim/autoload/vundle/config.vim 26 | 27 | # establing soft link of .vimrc 28 | ln -s ~/.vim/vimrc/.vimrc ~/.vimrc 29 | # installing vim plugins 30 | vim +BundleInstall +qa 31 | 32 | # establing soft link of colorscheme 33 | mkdir -p ~/.vim/colors 34 | ln -s ~/.vim/bundle/molokai/colors/molokai.vim ~/.vim/colors/ 35 | -------------------------------------------------------------------------------- /screenshots/secure-screen-blink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmule/vim/480e52c14e835e8ed850940fde5bc806249310cc/screenshots/secure-screen-blink.png --------------------------------------------------------------------------------