wincent/Command-T — pull request #39 by gnab (2012-03-19 22:45:57+00:00)
Title: Make selection acceptance commands configurable

Opening a file in a tab opens a new tab even if a tab or buffer containing the very same file already exists. By making the selection acceptance commands configurable, one may prevent this kind of behavior, i.e. like this:

set switchbuf=usetab

function! GotoOrOpen(...)
for file in a:000
if bufexists(file)
exec "sb " . file
else
exec "tabe " . file
endif
endfor
endfunction

command! -nargs=+ GotoOrOpen call GotoOrOpen("")

let g:CommandTAcceptSelectionTabCommand = 'GotoOrOpen'

If there is any other way to achieve this without applying the pull request, please enlighten me! :)

Regards,
Ole Petter