そろそろ晒すタイミングでしょ
解説とかはvimrcの中に付け足しときます。
.vimrc
" neobundle settings {{{if has('vim_starting')setnocompatibleif!isdirectory(expand("~/.vim/.bundle/neobundle.vim/")) " neobundleの自動インストール。要git
echo "install neobundle..."
:call system("git clone git://github.com/Shougo/neobundle.vim ~/.vim/.bundle/neobundle.vim")endifsetruntimepath+=~/.vim/.bundle/neobundle.vim/endifcall neobundle#begin(expand('~/.vim/.bundle'))letg:neobundle_default_git_protocol='https'
NeoBundleFetch 'Shougo/neobundle.vim'" もはや+luaが一般的なので無い場合neobundlecacheとかいらないif has('lua')
NeoBundleLazy 'Shougo/neocomplete.vim', {
\ 'depends' : 'Shougo/vimproc',
\ 'autoload' : { 'insert' : 1,}
\ }
endif
NeoBundle 'Shougo/neomru.vim', {
\ 'depends' : 'Shougo/unite.vim'
\ }
NeoBundleLazy 'Shougo/neosnippet', {
\ 'depends' : 'Shougo/neosnippet-snippets',
\ 'autoload' : {
\ 'insert' : 1,
\ 'filetypes' : 'snippet',
\ }}
NeoBundle 'Shougo/neosnippet-snippets'
NeoBundle 'Shougo/unite.vim'
NeoBundleLazy 'Shougo/vimfiler', {
\ 'depends' : ["Shougo/unite.vim"],
\ 'autoload' : {
\ 'commands' : [ "VimFilerTab","VimFiler","VimFilerExplorer","VimFilerBufferDir" ],
\ 'mappings' : ['<Plug>(vimfiler_switch)'],
\ 'explorer' : 1,
\ }}
NeoBundle 'Shougo/vimproc', {
\ 'build' : {
\ 'windows' : 'make -f make_mingw32.mak',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\ }
NeoBundleLazy 'Shougo/vimshell', {
\ 'depends' : 'Shougo/vimproc',
\ 'autoload' : {
\ 'commands' : [{ 'name' : 'VimShell','complete' : 'customlist,vimshell#complete'},
\ 'VimShellExecute','VimShellInteractive',
\ 'VimShellTerminal','VimShellPop'],
\ 'mappings' : ['<Plug>(vimshell_switch)']
\ }}
NeoBundleLazy 'tpope/vim-endwise', {
\ 'autoload' : { 'insert' : 1,}}
NeoBundle 'tpope/vim-fugitive', {
\ 'augroup' : 'fugitive',}
NeoBundle 'tpope/vim-rails'
NeoBundle 'tpope/vim-surround'
NeoBundle 'vim-scripts/matchit.zip'
NeoBundle 'vim-scripts/taglist.vim'
NeoBundleLazy 'thinca/vim-quickrun', {
\ 'autoload' : {
\ 'mappings' : [['n','\r']],
\ 'commands' : ['QuickRun']
\ }}
NeoBundle 'thinca/vim-ref'if has('mac')|| has('win32unix')
NeoBundle 'glidenote/memolist.vim'endif
NeoBundleLazy 'alpaca-tc/alpaca_tags', {
\ 'depends': ['Shougo/vimproc','Shougo/unite.vim'],
\ 'autoload' : {
\ 'commands' : ['Tags','TagsUpdate','TagsSet','TagsBundle','TagsCleanCache'],
\ 'unite_sources' : ['tags']
\ }}
NeoBundle 'Townk/vim-autoclose'
NeoBundle 'AndrewRadev/switch.vim'
NeoBundleLazy "davidhalter/jedi-vim", {
\ "autoload": {
\ "filetypes": ["python","python3","djangohtml"],
\ },
\ "build" : {
\ "mac" : "pip install jedi",
\ "unix" : "pip install jedi",
\ }}
NeoBundle 'fuenor/qfixgrep'
NeoBundle 'hail2u/vim-css3-syntax'
NeoBundleLazy 'junegunn/vim-easy-align', {
\ 'autoload': {
\ 'commands' : ['EasyAlign'],
\ 'mappings' : ['<Plug>(EasyAlign)'],
\ }}
NeoBundleLazy 'Yggdroot/indentLine', {
\ 'autoload' : {
\ 'commands' : ['IndentLinesReset','IndentLinesToggle'],
\ }}
NeoBundle 'kannokanno/previm'
NeoBundle 'kchmck/vim-coffee-script'
NeoBundle 'LeafCage/yankround.vim'
NeoBundle 'Lokaltog/vim-easymotion'
NeoBundleLazy 'mattn/emmet-vim', {
\ 'autoload' : {
\ 'filetypes' : ['html','html5','eruby','jsp','xml','css','scss','coffee'],
\ 'commands' : ['<Plug>ZenCodingExpandNormal']
\ }}
NeoBundle 'moll/vim-node'" 最近知ったjellybeanから乗り換えたcolor scheme
NeoBundle 'junegunn/seoul256.vim'
NeoBundle 'pangloss/vim-javascript'
NeoBundle 'rcmdnk/vim-markdown'
NeoBundle 'rking/ag.vim'
NeoBundle 'rizzatti/dash.vim'
NeoBundleLazy "sjl/gundo.vim", {
\ "autoload": {"commands": ['GundoToggle'],}}
NeoBundle 'othree/html5.vim'
NeoBundle 'tomtom/tcomment_vim'
NeoBundle 'tyru/open-browser.vim'
NeoBundle 'yuratomo/w3m.vim'
NeoBundleLazy 'vim-ruby/vim-ruby', {
\ 'autoload' : {'filetypes' : ['ruby','eruby']}}
NeoBundle 'scrooloose/syntastic'" Ricty の powerlineパッチ版を入れること
NeoBundle 'itchyny/lightline.vim'
NeoBundle 'slim-template/vim-slim'
NeoBundleCheck
call neobundle#end()filetype plugin indent on" }}}" plugin data directories {{{letg:neocomplete#data_directory = expand('~/.vim/etc/neocomplete')letg:vimfiler_data_directory = expand('~/.vim/etc/vimfiler')letg:vimshell_temporary_directory = expand('~/.vim/etc/VimShell')letg:neosnippet#data_directory = expand('~/.vim/etc/.cache/neosnippet')letg:neosnippet#snippets_directory = [expand('~/.vim/.bundle/neosnippet-snippets/neosnippets'),expand('~/dotfiles/snippets')]
letg:unite_data_directory = expand('~/.vim/etc/unite')letg:neomru#file_mru_path = expand('~/.vim/etc/neomru/file')letg:neomru#directory_mru_path = expand('~/.vim/etc/neomru/direcroty')letg:ref_cache_dir = expand('~/.vim/etc/vim_ref_cache')letg:w3m#history#save_file = expand('~/.vim/etc/.vim_w3m_hist')letg:yankround_dir = expand('~/.vim/etc/.cache/yankround')" markdownのメモを共有するディレクトリに入れとくletg:memolist_path = expand('~/GoogleDrive/memolist')" }}}" neocomplete {{{letg:neocomplete#enable_at_startup =1letg:neocomplete#auto_completion_start_length =4letg:neocomplete#enable_ignore_case =1letg:neocomplete#enable_smart_case =1letg:neocomplete#enable_camel_case =1letg:neocomplete#use_vimproc =1letg:neocomplete#sources#buffer#cache_limit_size =1000000letg:neocomplete#sources#tags#cache_limit_size =30000000letg:neocomplete#enable_fuzzy_completion =1letg:neocomplete#lock_buffer_name_pattern ='\*ku\*'" }}}" neosnippet {{{
imap <C-k><Plug>(neosnippet_expand_or_jump)smap<C-k><Plug>(neosnippet_expand_or_jump)" }}}" unite {{{letg:unite_enable_start_insert=1
nmap <silent><C-u><C-b> :<C-u>Unite buffer<CR>
nmap <silent><C-u><C-f> :<C-u>UniteWithBufferDir -buffer-name=filesfile<CR>
nmap <silent><C-u><C-r> :<C-u>Unite -buffer-name=registerregister<CR>
nmap <silent><C-u><C-m> :<C-u>Unite file_mru<CR>
nmap <silent><C-u><C-u> :<C-u>Unite buffer file_mru<CR>
nmap <silent><C-u><C-a> :<C-u>UniteWithBufferDir -buffer-name=files buffer file_mru bookmark file<CR>auFileType unite nmap <silent><buffer><expr><C-j> unite#do_action('split')auFileType unite imap <silent><buffer><expr><C-j> unite#do_action('split')auFileType unite nmap <silent><buffer><expr><C-l> unite#do_action('vsplit')auFileType unite imap <silent><buffer><expr><C-l> unite#do_action('vsplit')auFileType unite nmap <silent><buffer><ESC><ESC>qauFileType unite imap <silent><buffer><ESC><ESC><ESC>q" }}}" vimfiler {{{letg:vimfiler_as_default_explorer =1letg:vimfiler_safe_mode_by_default =0nnoremap<silent><C-u><C-j> :<C-u>VimFilerBufferDir -split -simple -winwidth=35-no-quit -toggle<CR>" }}}" vimshell {{{
nmap <silent>vs :<C-u>VimShell<CR>
nmap <silent> vp :<C-u>VimShellPop<CR>" }}}" qfixgrep {{{let QFixWin_EnableMode =1let QFix_UseLocationList =1let mygrepprg ='grep'let MyGrep_ExcludeReg ='[~#]$\|\.dll$\|\.exe$\|\.lnk$\|\.o$\|\.obj$\|\.pdf$\|\.xls$'letg:MyGrep_Smartcase =0let QFix_Height =30" }}}" memolist {{{letg:memolist_gfixgrep =1letg:memolist_unite =1letg:memolist_unite_option ="-vertical -start-insert"nnoremap mn :MemoNew<CR>nnoremapml :MemoList<CR>nnoremap mg :MemoGrep<CR>" }}}" quickrun {{{letg:quickrun_config = {}
letg:quickrun_config._ = { 'runner' : 'vimproc',
\ 'runner/vimproc/updatetime' : 200,
\ 'outputter/buffer/split' : ':botright 8sp',
\ 'outputter' : 'multi:buffer:quickfix',
\ 'hook/close_buffer/enable_empty_data' : 1,
\ 'hook/close_buffer/enable_failure' : 1,
\ }
nnoremap<expr><silent><C-c> quickrun#is_running() ? quickrun#sweep_sessions() : "\<C-c>"" }}}" alfredがあるとほぼ使わない気が...今度消すか考えるか" vim-ref {{{letg:ref_use_vimproc=1letg:ref_refe_version=2letg:ref_refe_encoding ='utf-8'letg:ref_source_webdict_sites = {
\ 'ja': {
\ 'url': 'http://dictionary.infoseek.ne.jp/jeword/%s',
\ 'line': 14,
\ },
\ 'ej': {
\ 'url': 'http://dictionary.infoseek.ne.jp/ejword/%s',
\ 'line': 14,
\ },
\ 'wiki': {
\ 'url': 'http://ja.wikipedia.org/wiki/%s',
\ }}
letg:ref_source_webdict_sites.default ='ej'" }}}" switch {{{
nmap + :Switch<CR>
nmap - :Switch<CR>" }}}" alpaca_tags {{{letg:alpaca_update_tags_config = {
\ '_' : '-R --sort=yes --languages=-js,html,css',
\ 'ruby': '--languages=+Ruby',
\ }
" }}}" jedi-vim {{{letg:jedi#rename_command ='<Leader>R'letg:jedi#goto_assignments_command ='<Leader>G'autocmdFileType python setlocalomnifunc=jedi#completions
letg:jedi#completions_enabled =0letg:jedi#auto_vim_configuration =0" }}}" emmet {{{letg:use_emmet_complete_tag =1letg:user_emmet_settings = {
\ 'lang' : 'ja',
\ 'html' : {
\ 'indentation' : ' '
\ }}
" }}}" Alignより好き" vim-easy-align {{{
vmap <Enter><Plug>(EasyAlign)
nmap <Leader>a<Plug>(EasyAlign)" }}}" yankround.vim {{{
nmap p<Plug>(yankround-p)
nmap P<Plug>(yankround-P)
nmap <C-p><Plug>(yankround-prev)
nmap <C-n><Plug>(yankround-next)letg:yankround_max_history =100nnoremap<Leader><C-p> :<C-u>Unite yankround<CR>"}}}" vim-easymotion {{{letg:EasyMotion_do_mapping =0
nmap s<Plug>(easymotion-s2)
xmap s<Plug>(easymotion-s2)
omap z <Plug>(easymotion-s2)
nmap g/ <Plug>(easymotion-sn)
xmap g/ <Plug>(easymotion-sn)
omap g/ <Plug>(easymotion-tn)letg:EasyMotion_smartcase =1
map <Leader>j<Plug>(easymotion-j)
map <Leader>k<Plug>(easymotion-k)letg:EasyMotion_startofline =0letg:EasyMotion_keys ='QZASDFGHJKL;'letg:EasyMotion_use_upper =1letg:EasyMotion_enter_jump_first =1" }}}" あんまりdashも使わないんだよな、これも消すかも" dash.vim {{{
nmap <Leader>d<Plug>DashSearch
" }}}" vim-markdown {{{letg:vim_markdown_folding_disabled =1" }}}" これバッファの修正履歴だけど、入れた物のあることを忘れがち。git diffで十分かも" gundo.vim {{{
nmap <Leader>g :GundoToggle<CR>" }}}" open-browser {{{letg:netrw_nogx =1" disable netrw's gx mapping.
nmap gx <Plug>(openbrowser-smart-search)" }}}" ruby書くときにはお世話になっているコーディングスタイルの確認に使おう" syntastic {{{letg:syntastic_mode_map = {
\ 'mode': 'passive',
\ 'active_filetypes': ['ruby','eruby','javascript']
\ }
letg:syntastic_ruby_checkers = ['rubocop']
" }}}" lightline {{{letg:lightline = {
\ 'colorscheme': 'jellybeans',
\ 'active': {
\ 'left': [ [ 'mode','paste' ],
\ [ 'fugitive','filename' ] ]
\ },
\ 'component': {
\ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}',
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
\ },
\ 'component_visible_condition': {
\ 'readonly': '(&filetype!="help"&& &readonly)',
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
\ },
\ 'component_function': {
\ 'fugitive': 'MyFugitive',
\ 'readonly': 'MyReadonly',
\ 'modified': 'MyModified',
\ 'filename': 'MyFilename'
\ },
\ 'separator': { 'left': "\u2b80",'right': "\u2b82" },
\ 'subseparator': { 'left': "\u2b81",'right': "\u2b83" }
\ }
function! MyModified()if&filetype=="help"return""elseif&modifiedreturn"+"elseif&modifiablereturn""elsereturn""endifendfunctionfunction! MyReadonly()if&filetype=="help"return""elseif&readonlyreturn"⭤"elsereturn""endifendfunctionfunction! MyFugitive()if exists("*fugitive#head")let _ = fugitive#head()return strlen(_) ? '⭠ '._ : ''endifreturn''endfunctionfunction! MyFilename()return(''!= MyReadonly() ? MyReadonly() . ' ' : '') .
\ (''!= expand('%:t') ? expand('%:t') : '[No Name]') .
\ (''!= MyModified() ? ' ' . MyModified() : '')endfunction" }}}" taglist.vim {{{let Tlist_Ctags_Cmd ="/usr/local/bin/ctags"let Tlist_Show_One_File =1let Tlist_Use_Right_Window =1let Tlist_Exit_OnlyWindow =1
nmap <silent><leader>tl :TlistToggle<CR>" }}}" 今んとここんな単純な設定でも不便はない。" encoding {{{setencoding=utf-8setfileencodings=utf-8,iso-2022-jp,euc-jp,sjis,cp932
setfileformats=unix,dos,mac
" }}}" appearance {{{sett_Co=256syntaxonletg:seoul256_background =233colorscheme seoul256
" jellybean時の設定が...これも消すかもhi EasyMotionTarget guifg=#80a0ff ctermfg=81setnobackupsetnoswapfilesetmatchpairs& matchpairs+=<:>sethlsearchsetignorecasesetsmartcasesetinfercasesetlaststatus=2setrulersetnumbersetnowrapsetlistsetwildmenusetshowcmdsetclipboard& clipboard+=unnamed
setautoindentsetshiftroundsetshiftwidth=2setsofttabstop=2setexpandtabsettabstop=2setsmarttabsetfoldmethod=indent
setfoldlevel=30"etcsetnf=hex
setmouse=a"key-mapping
imap <C-j><esc>
nmap <Esc><Esc> :nohlsearch<CR><Esc>
nmap <Tab> %
vmap <Tab> %
" }}}
総評
今見返しても10分程度で見返せる自分のvimrc。
このコンパクト感が好き。今度手入れしよう。