I am writing a vim plugin in which I need to check if the current tab the user is looking at is empty. If it is not empty, like say the user is already viewing a buffer or h
Maybe I'm not understanding the question, but to check if a tab has no buffer do this:
if bufname("%") == ""