VIM, when opening buffers, seem to hide current one and replace it with the
newly opened one. I want it to behave so that it instead opens a new tab and
opens the new buffer there. I tried something like:

autocmd BufReadPre * call CreateTab()

let s:firstcall = 1
function! CreateTab ()
        if (s:firstcall)
                let s:firstcall = 0
        else
                tabn
        endif
endfunction

The firstcall is to ignore the starting file which already has it's own
window. This doesn't work so well because somehow BufReadPre doesn't really
seem to happen before slamming the buffer into the current window. I have
read the helpfile for autocmd a couple of times, but I really can't make out
which autocmd is appropriate, there are so many to choose from.
-- 
View this message in context: 
http://www.nabble.com/autocmd-help---Sending-new-buffers-into-tabs-tf3669182.html#a10252039
Sent from the Vim - General mailing list archive at Nabble.com.

Reply via email to