How Can I Close the Leftmost Window in Vim?
- by msutherl
I'm trying to write a command that will close a tree-browser (vim-tree) window and resize the other windows.
,to opens the window and adjusts the window size so that all open windows retain a normal size (using :set columns+=30CTRL-W =).
,tc should close the tree window (full-length, far left) and resize the main window (:set columns-=30).
How can I write a command that closes the leftmost window so that I can type ,tc to close the window and resize in one shot?
I can navigate to it with CTRL-W h, but it is inelegant and potentially annoying (audible bell!) to use 10CTRL-W h in the command.
:topleft c unfortunately doesn't work.
Can you think of an elegant way to do this?