Skip to main content
2 of 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/

If you want to close all windows(splits) except the current one:

:only

If you want to close all tabs except the current one:

:tabonly

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.

Matt Boehm
  • 3k
  • 16
  • 14