Moving a split Vim window to the other half of the screen

Solution 1:

You wouldn't "close" the buffer C, only the window that displays it.

Vim has dedicated normal mode commands for:

  • switching a window and the next one in a row or column,
  • rotating the whole window layout,
  • pushing a window to the far top, far right, far bottom, and far left,

but it doesn't have one for moving a window to an arbitrary point so, assuming the window you want to move has the focus, the command should look like this:

:q|winc w|sp c

which is not too shabby. You might be able to find a plugin that provides the level of control you are after on https://www.vim.org.