Skip to content

Instantly share code, notes, and snippets.

@nrtkbb
Created January 22, 2018 20:49
Show Gist options
  • Save nrtkbb/3011d61208145c3fb7bd850088f2458b to your computer and use it in GitHub Desktop.
Save nrtkbb/3011d61208145c3fb7bd850088f2458b to your computer and use it in GitHub Desktop.
for ctrlp
" ctrlp
NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'rking/ag.vim'
let g:ctrlp_mruf_max = 500 " MRUの最大記録数
let g:ctrlp_extensions = ['buffertag', 'dir', 'line', 'mixed']
let g:ctrlp_show_hidden = 1
set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX
" set wildignore+=*\\.git\\*,*\\.hg\\*,*\\.svn\\* " Windows ('noshellslash')
if executable('ag') " agが使える環境の場合
let g:ctrlp_use_caching=0 " CtrlPのキャッシュを使わない
let g:ctrlp_user_command='ag %s -i --hidden -g ""' " 「ag」の検索設定
endif
" Prefix: s
nnoremap s <Nop>
nnoremap sa :<C-u>CtrlP<Space>
nnoremap sb :<C-u>CtrlPBuffer<CR>
nnoremap sd :<C-u>CtrlPDir<CR>
nnoremap sf :<C-u>CtrlP<CR>
nnoremap si :<C-u>CtrlPLine<CR>
nnoremap sm :<C-u>CtrlPMRUFiles<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment