stack.vim is a relatively naive tiling window manager for Vim. It takes into account the terminal dimensions to split in an intelligent (to the author) way. With larger screen sizes being more prevalent, a h-stack type layout for a text editor makes sense.
I kept forgetting the Vim commands to layout my splits in a way that made sense to me so I wrote this to do it for me.
stack.vim currently support h-stack and v-stack type layouts, depending on session size. For portrait-type dimensions it defaults to h-stack and for landscape-type dimensions, v-stack. With varying font preferences, it's impossible in the terminal to tell the true dimensions of the window so we use &columns
and &lines
to make a reasonable guess. More information under config.
+-----------------------+
| |
| |
| |
| |
| |
| |
| |
| |
+-------+-------+-------+
| | | |
| | | |
| | | |
| | | |
+-------+-------+-------+
+-------------------+-------------+
| | |
| | |
| +-------------+
| | |
| | |
| +-------------+
| | |
| | |
+-------------------+-------------+
If you don't have a preferred installation method, check out pathogen.vim or Vundle.
g:stack#config#min_columns
Number of columns required to flip the layout to v-stack (default: 160)
g:stack#config#min_lines
Number of lines required to flip the layout to h-stack (default: 70)
g:stack#config#default_mapping
Add the default key maps (default: true)
Keys | Command |
---|---|
Ctrln | StackNewWindow |
Ctrlc | StackCloseWindow |
Ctrll | StackPromoteWindow |
- Add a columns layout for larger terminal sizes
- Expand help text
Copyright (c) Cameron Daniel. Distributed under the same terms as Vim itself. See :help license