kien / ctrlp.vim

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

Open in a new tab unless current tab is empty #374

Open daGrevis opened 11 years ago

daGrevis commented 11 years ago

I'm using this setting I found here earlier.

" Opens file in new tab when using CtrlP.
let g:ctrlp_prompt_mappings = {
    \ 'AcceptSelection("e")': ['<c-t>'],
    \ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
    \ }

Is it somehow possible to improve it so that when I open Vim and I don't have anything opened, pressing <C-p> opens file in this tab, but next time — when I do have some content in current tab — in a new tab? That would be awesome.

Thanks! :)

daGrevis commented 11 years ago

Bump!

P.S. Maybe script in VimL?