LoginSignup
15
14

More than 5 years have passed since last update.

file_rec/asyncとfile_rec/gitを自動的に切り換える

Posted at

久々にunite.vimをアップデートしたらfile_rec/gitなるsourceが追加されていた。ドキュメントによるとfile_rec/asyncよりgitディレクトリでは高速に動作するとのことだったので、カレントディレクトリに .git ディレクトリがあるかどうかで切り換えるようにした。確かに若干速くなったような...?

NeoBundle 'Shougo/unite.vim'

function! DispatchUniteFileRecAsyncOrGit()
  if isdirectory(getcwd()."/.git")
    Unite file_rec/git
  else
    Unite file_rec/async
  endif
endfunction

nnoremap <silent> <C-p> :<C-u>call DispatchUniteFileRecAsyncOrGit()<CR>
15
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
14