ctrlp.vim icon indicating copy to clipboard operation
ctrlp.vim copied to clipboard

Is it possible to have ctrlp open files in a new tab upon <CR>, instead of <c-t>?

Open lavie opened this issue 9 years ago • 2 comments

Sorry if opening an issue isn't the right way of asking such questions. Feel free to close this and direct me to the proper forum if so.

lavie avatar Apr 06 '15 05:04 lavie

In your .vimrc

let g:ctrlp_prompt_mappings = {
    \ 'AcceptSelection("e")': ['<2-LeftMouse>'],
    \ 'AcceptSelection("t")': ['<cr>'],
    \ }

Don't omit the "e" line to make sure you "unbind" beforehand.

dominik-filip avatar May 13 '15 21:05 dominik-filip

Follow-up question: This configuration opens a new tab page - even when firing up a fresh vim which leaves the initial unnamed buffer in its dedicated tab. Is there a way to automatically close this buffer in this scenario?

leissa avatar Apr 04 '22 17:04 leissa