I have a function in vim which will open all buffers as tabs. However after I add this function, vimdiff too opens the files to be compared as different tabs and hence doesn't show the differences. Is there a way where I can find out if its vim or vimdiff which is invoking my vimrc file?
function! OpenTabs() let bf=len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) if bf > 1 exe "tab 5sball" endif endfunction