kien / ctrlp.vim

Fuzzy file, buffer, mru, tag, etc finder.
kien.github.com/ctrlp.vim
7.26k stars 676 forks source link

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

Open lavie opened 9 years ago

lavie commented 9 years ago

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.

dominik-filip commented 9 years ago

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.

leissa commented 2 years ago

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?