sponsor Vim development Vim logo Vim Book Ad

GoldenView.Vim : Always have a nice view for vim split windows

 script karma  Rating 37/10, Downloaded by 4146  Comments, bugs, improvements  Vim wiki

created by
Zhao Cai
 
script type
utility
 
description

Please goto homepage for a better view of the introduction.

Homepage: http://zhaocai.github.io/GoldenView.Vim/
Screencast:  http://dl.dropboxusercontent.com/u/1897501/Screencasts/GoldenView.gif


If you like it, please star or fork in https://github.com/zhaocai/GoldenView.Vim so that more people may find it.






>>> Introduction:

The initial motive for GoldenView comes from the frustration of using other vim plugins to autoresize split windows. The idea is deadly simple and very useful: resize the focused window to a proper size. However, in practice, many hiccups makes autoresizing not a smooth experience. Below are a list of issues I am trying to solve:

First and the most important one, autoresizing should play nicely with existing plugins like tagbar, vimfiler, unite, VOoM, quickfix, undotree, gundo, etc. These windows should manage there own window size.

Second, autoresizing should take care of the other windows too. Resizing the focused window may cause the other windows become too small. When you have 4+ split windows, autoresizing may just make a mess out of it.




>>> Features:

GoldenView has preliminarily solved the issues described above. It also provides other features. Bascally, it does two things:

1. Autoresizing

First of all, it automatically resize the focused split window to a "golden" view based on golden ratio and textwidth.

2. Tiled Windows Management

Second, it maps a single key (<C-L> by default) to nicely split windows to tiled windows.

      ====+==============+============+===+
      |   |              |            |   |
      | F |              |    S1      | T |
      | I |              +------------| A |
      | L |  MAIN PANE   |    S2      | G |
      | E |              +------------+ B |
      | R |              |    S3      | A |
      |   |              |            |   |
      +===+==============+============+===+

To get this view, just hit <C-L> 4 times. or, if you have a large monitor, you may get tiled windows below.

      +===+==============+==============+============+===+
      |   |              |              |            |   |
      | F |              |              |    S1      | T |
      | I |              |              +------------| A |
      | L |  MAIN PANE   |      M2      |    S2      | G |
      | E |              |              +------------+ B |
      | R |              |              |    S3      | A |
      |   |              |              |            |   |
      +===+==============+==============+============+===+


To quickly switch between those windows, a few keys are mapped to

- Focuse to the main window
- Switch with the largest, smallest, etc.
- Jump to next and previous window

Requirements:
- Vim 7.3 or later
 
install details
http://zhaocai.github.io/GoldenView.Vim/>
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
GoldenView.Vim-1.3.6.zip 1.3.6 2013-05-08 7.3 Zhao Cai - Maintenance update
linepower.vim-1.0.0.zip 1.0.0 2013-05-08 7.3 Zhao Cai - 1 Major Enhancements
    * add unite.vim local_theme
- 5 Minor Enhancements
    * tweak local colors for tagbar and vimfiler
    * tagbar statusline
    * rake install/diff
    * use @window_cached
    * add config
    
GoldenView.Vim-1.3.5.zip 1.3.5 2013-04-26 7.3 Zhao Cai - Fix for issue #5 (github).  
- Fix for Dirdiff, FencView
- Improve tracing
GoldenView.Vim-1.3.0.zip 1.3.0 2013-04-22 7.3 Zhao Cai - Diff mode auto-resizing
- refactor autocmd function: tweak restore behavior
GoldenView.Vim-1.2.2.zip 1.2.2 2013-04-21 7.3 Zhao Cai Improve documents and small bug fixes,
Load guard for #4 (github)
GoldenView.Vim-1.2.0.zip 1.2.0 2013-04-19 7.3 Zhao Cai add restore rule for some special buffers, which solves all the hiccups I could identify so far.
GoldenView.Vim-1.1.2.zip 1.1.2 2013-04-18 7.3 Zhao Cai Improve documents, fix load sequence
GoldenView.Vim-1.1.1.zip 1.1.1 2013-04-18 7.0 Zhao Cai - Fix library script loading.
GoldenView.Vim.zip 1.1 2013-04-18 7.0 Zhao Cai Initial upload
ip used for rating: 3.139.233.43

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github