-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaccordion.txt
140 lines (107 loc) · 6.4 KB
/
accordion.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
*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