Skip to content

Instantly share code, notes, and snippets.

@amadeus
Created November 8, 2012 23:47
Show Gist options
  • Save amadeus/4042680 to your computer and use it in GitHub Desktop.
Save amadeus/4042680 to your computer and use it in GitHub Desktop.
CtrlP Buffer Delete
" TESTING: CtrlPBuf Delete
let g:ctrlp_buffer_func = { 'enter': 'MyCtrlPMappings' }
func! MyCtrlPMappings()
nnoremap <buffer> <silent> <c-@> :call <sid>DeleteBuffer()<cr>
endfunc
func! s:DeleteBuffer()
exec "bd" fnamemodify(getline('.')[2:], ':p')
exec "norm \<F5>"
endfunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment