Permalink
Switch branches/tags
Nothing to show
Find file Copy path
644c1e7 Jan 24, 2014
1 contributor

Users who have contributed to this file

141 lines (107 sloc) 6.4 KB
*accordion.vim* Minimize all but a few splits
*accordion*
Author: Matthew Boehm <http://github.com/mattboehm>
==============================================================================
CONTENTS *accordion_contents*
╓ Introduction ─────────────────────────────── |accordion_intro|
╠ Commands ─────────────────────────────────── |accordion_commands|
║ ├ Starting................................. |accordion_starting|
║ ├ Stopping................................. |accordion_stopping|
║ ├ Zooming.................................. |accordion_zooming|
║ └ Running Once............................. |accordion_running_once|
╠ Configuration ────────────────────────────── |accordion_configuration|
║ ├ Suggested vimrc settings................. |accordion_suggested_settings|
║ └ Options.................................. |accordion_options|
╙ Limitations ──────────────────────────────── |accordion_limitations|
==============================================================================
INTRODUCTION *accordion_intro*
Accordion is a window manager for people who love splits. Tell it the maximum
number of splits you want to see and any extra splits will be shrunk for
you. As you change windows, the viewport moves with you.
==============================================================================
COMMANDS *accordion_commands*
------------------------------------------------------------------------------
STARTING *accordion_starting*
:Accordion <size> *:Accordion*
Start enforcing that the current tab is <size> vsplits wide
:AccordionAll <size> *:AccordionAll*
Start enforcing that all tabs are <size> vsplits wide
:AccordionDiff *:AccordionDiff*
Start enforcing that the current tab shows 2 vsplits which
are always diffed against each other.
------------------------------------------------------------------------------
STOPPING *accordion_stopping*
:AccordionStop *:AccordionStop*
Turn off auto-layout and reset window sizes.
Tries to turn off tab-specific rule. If there is none, tries to turn off
global rule.
------------------------------------------------------------------------------
ZOOMING *accordion_zooming*
:AccordionZoomIn *:AccordionZoomIn*
Subtract 1 from maximum number of vsplits
Tries to modify tab setting. If there is none, modifies global setting
Raises an error if the new size would be less than 1
:AccordionZoomOut *:AccordionZoomOut*
Add 1 to maximum number of vsplits
Tries to modify tab setting. If there is none, modifies global setting
------------------------------------------------------------------------------
RUNNING ONCE *accordion_running_once*
:AccordionOnce <size> *:AccordionOnce*
Show only <size> windows and shrink the rest.
This does not start a layout, so if you switch windows, the viewport won't
update.
To start a layout, see |accordion_running|
To reset your windows to normal, run |:AccordionClear|
:AccordionClear *:AccordionClear*
Unlock/resize windows
If accordion is still running, as soon as you switch windows, the layout
will be applied again
If you want to stop accordion from running, see |accordion_stopping|.
==============================================================================
CONFIGURATION *accordion_configuration*
------------------------------------------------------------------------------
SUGGESTED VIMRC SETTINGS *accordion_suggested_settings*
If you want to always enforce a maximum number of vsplits to 4 >
AccordionAll 4
<
If you prefer hsplits >
let g:accordion_mode="h"
<
Use whatever shortcuts you want. I typically prefer <leader> to <C-w>
but chose these as they're less likely to conflict with your current mappings
and <C-w> kinda makes sense as you are messing with windows >
"Set shortcuts for most frequently used commands
nnoremap <C-w>2 :Accordion 2<CR>
nnoremap <C-w>3 :Accordion 3<CR>
nnoremap <C-w>0 :AccordionStop<CR>
"More shortcuts, without a good available <C-w> option
nnoremap <leader>d :AccordionDiff<CR>
nnoremap <leader>i :AccordionZoomIn<CR>
nnoremap <leader>o :AccordionZoomOut<CR>
<
------------------------------------------------------------------------------
OPTIONS *accordion_options*
g:accordion_mode *accordion_mode*
Values: "v", "h"
Default: "v"
Whether to use hsplits or vsplits. For now this is a global setting that
applies to all tabs and it is recommended that you do not change it while
accordion is running.
g:accordion_listening *accordion_listening*
Values: 0/1
Default: 1
If true, accordion listens for the window change event.
This must be 1 to use any of the commands in |accordion_starting|.
You can set this to 0 if you're only planning to use the commands in
|accordion_running_once| or do not plan on using accordion at all.
==============================================================================
LIMITATIONS *accordion_limitations*
1. |AccordionStop| only calls |AccordionClear| on the current tab even if
there are other tabs that were locked
2. Accordions are not recalculated when moving up/down. Using horizontal
splits in general may cause slightly unexpected behaviors. Please open an
issue on github if any behavior surprises you.
vim:tw=78:et:ft=help:norl