Sometimes when I'm working on a file, I'll open up multiple files just to get an idea of the current flow of the code up to a point. However this sometimes leads to multiple files being open at a time by split. Is there a command to quit all except the selected window?
If you want to close all windows(splits) except the current one:
If you want to close all tabs except the current one:
If you want to delete all hidden buffers (files open but not visible in any window on any tab), you'll have to add a function to your vimrc. Some people have posted possible functions to here and here
I'm not sure exactly which of these you were trying to accomplish, but hopefully some combination of these commands does the trick.
Press Ctrl+w,o to quickly close all split windows, but current one.
Alternatively use the command:
:on[ly][!] Make the current window the only one on the screen. All other windows are closed.