vimでプラグイン管理を簡単にするvundleインストール
vundleはvim上でモダンにpluginを管理出来るシステムです。vundleを利用することで簡単にvimのプラグインを導入することが出来るようになります。
vundleのインストール
$ cd $ mkdir .vim $ git clone http://github.com/gmarik/vundle.git ~/.vim/vundle.git
今回はvundleでneocomplcacheプラグインを管理出来るように設定
※neocomplcacheプラグインは入力時に自動補完を行なってくれる便利なプラグインです。
~/.vimrc
" vundle set nocompatible filetype off set rtp+=~/.vim/vundle.git call vundle#rc() Bundle 'Shougo/neocomplcache' filetype plugin indent on
call vundler#rc と filetype plugin indent on の間にインストールするプラグイン名を書きます。
上の場合 Shougo/neocomplcache プラグインを利用する時にする設定になります。
一度.vimrcを保存してvimを再起動します。
プラグインインストールコマンドの実行
:BundleInstall
するだけで neocomplcache が適切にインストールされます。 インストールが完了したらneocomplcacheの設定を.vimrcに次の記述を追加して下さい。
" Disable AutoComplPop. let g:acp_enableAtStartup = 0 " Use neocomplcache. let g:neocomplcache_enable_at_startup = 1 " Use smartcase. let g:neocomplcache_enable_smart_case = 1 " Use camel case completion. let g:neocomplcache_enable_camel_case_completion = 1 " Use underbar completion. let g:neocomplcache_enable_underbar_completion = 1 " Set minimum syntax keyword length. let g:neocomplcache_min_syntax_length = 3 let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*' " Define dictionary. let g:neocomplcache_dictionary_filetype_lists = { \ 'default' : '', \ 'vimshell' : $HOME.'/.vimshell_hist', \ 'scheme' : $HOME.'/.gosh_completions' \ } " Define keyword. if !exists('g:neocomplcache_keyword_patterns') let g:neocomplcache_keyword_patterns = {} endif let g:neocomplcache_keyword_patterns['default'] = '\h\w*' inoremap neocomplcache#undo_completion() inoremap neocomplcache#complete_common_string() " Recommended key-mappings. " : close popup and save indent. inoremap neocomplcache#close_popup() ."\" " : completion. inoremap pumvisible() ? "\" :"\" " , : close popup and delete backword char. inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#close_popup() inoremap neocomplcache#cancel_popup()
created: