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

daGrevis opened this Issue Mar 6, 2013 · 1 comment


None yet
1 participant

daGrevis commented Mar 6, 2013

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! :)


P.S. Maybe script in VimL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment