terminator, etc), you can run the following command:
$ xterm -e 'vim somefile.txt'
xterm will open and run the specified program (in this case, Vim). When the program exits, the terminal window closes as well. Running the above command, if you were to quit Vim, the terminal would go away as well.
Is there any way to get this (or similar) functionality through Terminal.app (on OSX)? The solution can be in AppleScript, Bash or anything else really, as long as it's achievable via commands I could run in a Bash script.