Skip to content

Instantly share code, notes, and snippets.

@tanaka51
Created December 8, 2016 20:04
Show Gist options
  • Save tanaka51/0c4b3943e5c230c5a9467c5b46ea309d to your computer and use it in GitHub Desktop.
Save tanaka51/0c4b3943e5c230c5a9467c5b46ea309d to your computer and use it in GitHub Desktop.
"" CtrlP with current filename
command! -nargs=0 CtrlPSwitcher call s:ctrlp_switcher()
function! s:ctrlp_switcher()
try
let default_input_save = get(g:, 'ctrlp_default_input', '')
let g:ctrlp_default_input = expand('%:t:r')
call ctrlp#init(g:ctrlp_builtins)
finally
if exists('default_input_save')
let g:ctrlp_default_input = default_input_save
endif
endtry
endfunction!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment