viを使う 3
の続きです。
.vimrcを編集してviの設定をします。
NeoBundleを使います。
vimのバージョンは7.4と8.0を想定しています。
Macの最初から入っているvim、brewでインストールしたvim、さくらのレンタルサーバーのvimで動作確認しています。
Raspberry Piでも動作すると思います。
.vimrcを編集する 4 : NeoBundleを使う
NeoBundleを使います。
.vimrcを編集する
.vimrcを編集して、viの設定をしていきます。
設定とその内容について説明します。
ホームディレクトリの.vimrcを編集します。
% vi ~/.vimrc
.vimrc
"" NeoBundle
"" git config --global http.proxy http://XXX.XXX.XXX.XXX:8080
"" git config --global https.proxy https://XXX.XXX.XXX.XXX:8080
"" --system | --global | --local
"" /usr/local/git/etc/gitconfig | ~/.gitconfig | .git/config
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
if !isdirectory(expand("~/.vim/bundle/neobundle.vim/"))
echo "install NeoBundle..."
:call system("git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim")
" :call system("git clone http://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim")
" :call system("git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim")
endif
endif
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
参考にしたホームページの通りです。
会社でviを使う場合は、高い確率でgitに対して上記のような設定が必要になると思います。
会社でviを使う場合は、高い確率でgitに対して上記のような設定が必要になると思います。
"" plugin list
"" colorscheme
NeoBundle 'nanotech/jellybeans.vim'
"" colorscheme
NeoBundle 'w0ng/vim-hybrid'
"" colorscheme
NeoBundle 'tomasr/molokai'
"" boost status line
NeoBundle 'itchyny/lightline.vim'
"" may not need space -> highlight red
"" :FixWhitespace (:F[Tab])
NeoBundle 'bronson/vim-trailing-whitespace'
"" bar
NeoBundle 'majutsushi/tagbar'
"" Unite
NeoBundle 'Shougo/unite.vim'
"" comment
NeoBundle 'tomtom/tcomment_vim'
"" CtrlP
NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'tacahiroy/ctrlp-funky'
NeoBundle 'suy/vim-ctrlp-commandline'
インストールするプラグイン一覧です。
call neobundle#end()
filetype plugin indent on
NeoBundleCheck
NeoBundleFetchとNeoBundleをbegin/endで囲んでいます。その外でNeoBundleCheckを使っています。githubにある情報の通りです。
" ------------------------------------------------------------------------------
"" jellybeans
"" echom : message history
"" :messages
"" hope block comment ...
if 0
if neobundle#is_installed('jellybeans.vim')
colorscheme jellybeans
else
echom 'not installed jellybeans.vim'
endif
endif
" ------------------------------------------------------------------------------
"" vim-hybrid
if 0
if neobundle#is_installed('vim-hybrid')
colorscheme hybrid
else
echom 'not installed vim-hybrid'
endif
endif
" ------------------------------------------------------------------------------
"" molokai
if 1
if neobundle#is_installed('molokai')
colorscheme molokai
else
echom 'not installed molokai'
endif
endif
色を確認するための仕組みです。自分はmolokaiに落ち着きました。
"" CtrlP
let g:ctrlp_match_window = 'order:ttb,min:20,max:20,results:100'
let g:ctrlp_show_hidden = 1
let g:ctrlp_types = ['fil']
let g:ctrlp_extensions = ['funky', 'commandline']
"" CtrlP plugin
command! CtrlPCommandLine call ctrlp#init(ctrlp#commandline#id())
let g:ctrlp_funky_matchtype = 'path'
CtrlPに対する設定です。
まとめ
molokaiとTCommentで、やる気と効率を上げます。
NeoBundleは開発が終了しているので、これから環境を作る人はこちらが良いと思います。
https://github.com/Shougo/dein.vim
参考
【詳解】モテたいVimmer必見 快適にコーディングするためのvimrc解説
https://github.com/Shougo/neobundle.vim
https://github.com/Shougo/dein.vim
広告
IT開発関連書とビジネス書が豊富な翔泳社の通販『SEshop』
さくらのレンタルサーバ

ムームードメイン

Oisix(おいしっくす)

らでぃっしゅぼーや

珈琲きゃろっと

エプソムソルト
