Skip to content

Instantly share code, notes, and snippets.

@todashuta
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save todashuta/7ced70029fe36a8b9fb5 to your computer and use it in GitHub Desktop.

Select an option

Save todashuta/7ced70029fe36a8b9fb5 to your computer and use it in GitHub Desktop.
Faster vimgrep
" BufRead イベントを一時的に無効にして vimgrep の所要時間を通常の約三分の一にする
" 注意: 圧縮されたファイルを読むようなプラグインが動作しなくなるという副作用がある
augroup faster-vimgrep
autocmd!
autocmd QuickFixCmdPre *vimgrep*
\ let s:save_eventignore = &eventignore
\ | set eventignore=BufRead
autocmd QuickFixCmdPost *vimgrep*
\ let &eventignore = s:save_eventignore
\ | unlet s:save_eventignore
augroup END
@todashuta
Copy link
Copy Markdown
Author

:noautocmd vimgrep /foo/j **/* | cw

で十分ということになった

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment