Keep Vim Displaying Three Windows
Vim script
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Thwins - Keep Vim Displaying Three Windows

Windows are always organised as follows:

|              |        S1        |
|     Main     |===================
|              |        S2        |

Priority Rules for Buffers

Current > Main > Displayed > New opened > Others


mkdir -p ~/.vim/plugin/ && \
curl -o ~/.vim/plugin/thwins.vim \

Key Mapping

  • <C-H> Make the current buffer as the main window
  • <C-L> Make current buffer displayed as full screen
  • <C-C> Delete current buffer
  • <C-D> Close all buffers except the current one
  • <C-J> Move cursor to next buffer
  • <C-K> Move cursor to previous buffer
  • <C-M> Set max window number between 3 and 2

Inspired By

dwm.vim by Stanislas Polu