Created
March 21, 2017 15:07
-
-
Save hyuki0000/c2eec9f51b4870acad9b2a26b8831cc6 to your computer and use it in GitHub Desktop.
LaTeXGrep - 前もって定めておいたディレクトリ内をvimgrepするコマンド
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" vimgrep given pattern in predefined directories. | |
function LaTeXGrep(pattern) | |
execute 'vimgrep' a:pattern '$DOCGIRL/note/doc*/*.tex' '$DOCGIRL/doc*/*.tex' | |
copen | |
endfunction | |
command -nargs=1 LaTeXGrep call LaTeXGrep(<f-args>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
環境変数
$DOCGIRL
は、~/.bash_profile
などで、のように指定しておく。もっと再帰的に降りていきたいときには、ディレクトリを、
のように
**
で表記するとよい。詳しくは、:help starstar-wildcard
参照。