Created
May 3, 2013 16:32
-
-
Save cloud8421/5510765 to your computer and use it in GitHub Desktop.
Sample ctrl-p configuration block to use with Greyhound
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
let g:greyhound_path = '/path/to/greyhound' | |
let g:ctrlp_use_caching = 0 | |
let g:greyhound_exclude_paths = ".git,public/system,public/uploads,.svn,tmp/,vendor/cache,vendor/bundle,log/,.bundle,coverage/" | |
let g:ctrlp_user_command = g:greyhound_path." --exclude ".g:greyhound_exclude_paths | |
let g:ctrlp_match_func = { 'match': 'Greyhound' } | |
function! Greyhound(items, str, limit, mmode, ispath, crfile, regex) | |
let cmd = g:greyhound_path.' --exclude '.g:greyhound_exclude_paths | |
if (strlen(a:str) > 0) | |
let cmd = cmd.' --query '.a:str | |
endif | |
return split(system(cmd), "\n")[0:10] | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment