Skip to content

Instantly share code, notes, and snippets.

@cloud8421
Created May 3, 2013 16:32
Show Gist options
  • Save cloud8421/5510765 to your computer and use it in GitHub Desktop.
Save cloud8421/5510765 to your computer and use it in GitHub Desktop.
Sample ctrl-p configuration block to use with Greyhound
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