ctrlpvim / ctrlp.vim

Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder.
ctrlpvim.github.com/ctrlp.vim
Other
5.57k stars 259 forks source link

Update readme user command for proper gitignore #535

Open palsivertsen opened 4 years ago

palsivertsen commented 4 years ago

I've been playing with the user command trying to respect any .gitignore files and came up with the following solution:

let g:ctrlp_user_command = 'git ls-files -co --exclude-standard $(git rev-parse --show-toplevel 2> /dev/null) 2> /dev/null || find . -type f'

How it works: