I often start editing my code at the top of a deep call chain, and use tags to jump deeper into the call chain.  But when going back to where I was before, I often (out of habit) close vim, meaning to open the last file.  Except where I wanted to go was actually back to the previous entry in the tag stack, so I have to start over at the top of the call chain and work my way down with tags.Is there a way to make vim warn before existing if the tag stack is not empty?I'm thinking something like the warning that you opened multiple files and haven't viewed them all yet: If you try to exit, you get a warning about there being files that you've not viewed, but if you exit again then vim will actually exit.
Warn before exiting if tag stack not empty?
tags
There's no built-in option, but you can implement a custom command that either :quits or :pops the last item from the tag stack.command! QuitOrPop try | pop |  catch /^Vim\%((\a\+)\)\=:E\%(73\|555\):/ | quit | endtryThis attempts to :pop and only :quits if there's a tag stack empty or at bottom of tag stack error message.You could then use the cmdalias.vim - Create aliases for Vim commands plugin to override the built-in :q (and variants like :wq) with the new :QuitOrPop command.