Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

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 herehere and herehere

I'm not sure exactly which of these you were trying to accomplish, but hopefully some combination of these commands does the trick.

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.

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.

Source Link
Matt Boehm
  • 3k
  • 16
  • 14

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.