blib/lib/App/Asciio/setup/Text/actions/vim_bindings.pl untested

filter: Statementstmt 0.0% 0 / 152 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 152 SCAR -
1  
2 #----------------------------------------------------------------------------------------------
3  
4 register_action_handlers_remove_old_shortcuts
5 (
6 # general
7 'Undo' => [ 'u' ],
8 'Redo' => [ 'C-r'],
9 'Zoom in' => [ '~Zoom in' ],
10 'Zoom out' => [ '~Zoom out' ],
11 'Insert from clipboard' => [ 'p' ],
12 'Copy to clipboard' => [ 'y' ],
13
14 'Export to clipboard & primary as ascii' => [ 'Y' ],
15 'Import from primary to box' => [ 'P' ],
16 'Import from primary to text' => [ 'A-P' ],
17 'Import from clipboard to box' => [ '~import from clipboard to box' ],
18 'Import from clipboard to text' => [ '~import from clipboard to text' ],
19
20 'Remove rulers' => [ 'A-r' ],
21
22 # elements
23 'Edit selected element' => [ 'Enter' ],
24 'Delete selected elements' => [ 'd' ],
25 'Change elements foreground color' => [ 'c' ],
26 'Change elements background color' => [ 'C' ],
27
28 'Insert flex point' => [ 'not set-Insert flex point' ],
29
30 # selection
31 'Select all elements' => [ 'V' ],
32 'Deselect all elements' => [ 'Escape' ],
33 'Select connected elements' => [ 'v' ],
34 'Switch cross mode' => ['A-x'],
35 'Select next element' => [ 'n' ],
36 'Select previous element' => [ 'N' ],
37 'Select next element move mouse' => [ 'Tab', \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [1, 1, 0] ],
38 'Select previous element move mouse' => [ 'S-Tab', \&App::Asciio::Actions::ElementsManipulation::select_element_direction, [0, 1, 0] ],
39 'Select element by id' => [ 'not_set-Select element by id' ],
40 'Select next non arrow' => [ 'C-n' ],
41 'Select previous non arrow' => [ '~Select previous non arrow' ],
42 'Select next arrow' => [ '~Select next non arrow' ],
43 'Select previous arrow' => [ '~Select previous arrow' ],
44
45 # sizing
46 'Make element narrower' => [ '1' ],
47 'Make element taller' => [ '2' ],
48 'Make element shorter' => [ '3' ],
49 'Make element wider' => [ '4' ],
50 'Shrink box' => [ 's' ],
51
52 # movement
53 'Move selected elements left' => [ ['h', 'Left'] ],
54 'Move selected elements right' => [ ['l', 'Right'] ],
55 'Move selected elements up' => [ ['k', 'Up'] ],
56 'Move selected elements down' => [ ['j', 'Down'] ],
57
58 'Move selected elements left quick' => ['A-Left' ],
59 'Move selected elements right quick' => ['A-Right'],
60 'Move selected elements up quick' => ['A-Up' ],
61 'Move selected elements down quick' => ['A-Down' ],
62  
63 # mouse
64 'Mouse emulation toggle' => [ "'" ],
65 'Mouse emulation right-click' => [ 'ä' ],
66 'Mouse emulation left-click' => [ 'ö' ],
67
68 'Mouse emulation selection flip' => [ '~Mouse emulation selection flip' ], # C-ö doesn't work
69 'Mouse emulation expand selection' => [ '~Mouse emulation exapand selection' ],
70 # 'Mouse left-click' => [ '~Mouse left-click' ],
71 # 'Mouse motion' => [ '~Mouse motion' ],
72 # 'Mouse motion 2' => [ '~Mouse motion 2' ],
73 # 'Mouse right-click' => [ '~Mouse right-click' ],
74 # 'Mouse expand selection' => [ '~Mouse expand selection' ],
75 # 'Mouse selection flip' => [ '~Mouse selection flip' ],
76  
77 # 'Mouse quick link' => [ ['A-ö', '.'] ],
78 'Mouse quick link git' => [ ['A-ä', ';'] ],
79 'Mouse duplicate elements' => [ ['A-Ö', ','] ],
80  
81 'Mouse on element id' => [ '~Mouse on element id' ],
82
83 'Mouse emulation drag left' => [ [ 'H', 'A-C-Left' ] ],
84 'Mouse emulation drag right' => [ [ 'L', 'A-C-Right'] ],
85 'Mouse emulation drag up' => [ [ 'K', 'A-C-Up' ] ],
86 'Mouse emulation drag down' => [ [ 'J', 'A-C-Down'] ],
87
88 'Mouse emulation move left' => [ 'C-Left' ],
89 'Mouse emulation move right' => [ 'C-Right' ],
90 'Mouse emulation move up' => [ 'C-Up' ],
91 'Mouse emulation move down' => [ 'C-Down' ],
92
93 'command leader'=>
94 {
95 SHORTCUTS => ':',
96
97 'Help' => [ 'h' ],
98 'Display manpage' => [ 'm', sub { my ($self) = @_ ; system('perldoc', 'App::Asciio') ; $self->update_display() ; } ],
99 'Display keyboard mapping' => [ 'k', sub
100 {
101 my ($self) = @_ ;
102 my $mapping_file = App::Asciio::Actions::Unsorted::get_keyboard_mapping_file($self) ;
103 system "cat '$mapping_file' | fzf --cycle --layout=reverse-list" ;
104 $self->update_display() ;
105 }
106 ],
107 'Display commands' => [ 'c' ],
108 'Display action files' => [ 'f' ],
109
110 'Open' => [ 'e' ],
111 'Insert' => [ 'r' ],
112 'Save' => [ 'w' ],
113 'SaveAs' => [ 'W' ],
114 'Quit' => [ 'q' ],
115 'Quit no save' => [ 'Q' ],
116 },
117
118 'Insert leader' =>
119 {
120 SHORTCUTS => 'i',
121
122 'Add from file' => [ 'f' ],
123 'Add fron stencil' => [ 's' ],
124 'Add multiple boxes' => [ 'C-b'],
125 'Add multiple texts' => [ 'C-t'],
126
127 'Add angled arrow' => [ 'A' ],
128 'Add arrow' => [ 'a' ],
129 'Add box' => [ 'b' ],
130 'Add connector type 2' => [ 'C' ],
131 'Add connector' => [ 'c' ],
132 'Add exec box no border' => [ 'E' ],
133 'Add exec box' => [ 'e' ],
134 'Add external command box no frame' => [ 'X' ],
135 'Add external command box' => [ 'x' ],
136 'Add help box' => [ 'h' ],
137 'Add horizontal ruler' => [ 'R' ],
138 'Add if' => [ 'i' ],
139 'Add process' => [ 'p' ],
140 'Add shrink box' => [ 'A-b' ],
141 'Add text' => [ 't' ],
142 'Add unicode arrow' => [ 'S' ],
143 'Add unicode box' => [ 'B' ],
144 'Add vertical ruler' => [ 'r' ],
145 'Add rhombus' => [ 'A-r' ],
146 'Add ellipse' => [ 'A-e' ],
147 },
148
149 'arrow leader' =>
150 {
151 SHORTCUTS => 'a',
152
153 'Append multi_wirl section' => [ 's' ],
154 'Insert multi_wirl section' => [ 'S' ],
155 'Change arrow direction' => [ 'd' ],
156 'Flip arrow start and end' => [ 'f' ],
157 'Prepend multi_wirl section' => [ 'p' ],
158 'Remove last section from multi_wirl' => [ 'A-s' ],
159 },
160
161 'grouping leader' =>
162 {
163 SHORTCUTS => 'g',
164
165 'Group selected elements' => [ 'g' ],
166 'Ungroup selected elements' => [ 'u' ],
167 'Ungroup group-object' => [ 'u' ],
168 'Move selected elements to the back' => [ 'b' ],
169 'Move selected elements to the front' => [ 'f' ],
170 'Temporary move to the front' => [ 'F' ],
171 'Make Unicode ' => [ '~Make Unicode' ],
172 },
173
174 'stripes-group leader' =>
175 {
176 SHORTCUTS => 'A-g',
177
178 'create stripes group' => ['g'],
179 'create one stripe group' => ['1'],
180 'ungroup stripes group' => ['u'],
181 },
182
183 'display leader' =>
184 {
185 SHORTCUTS => 'z',
186
187 'Change Asciio background color' => [ 'c' ],
188 'Change grid color' => [ 'C' ],
189 'Flip grid display' => [ 'g' ],
190 'Flip color scheme' => [ 's' ],
191 'Flip transparent element background' => [ 't' ],
192 'Change font' => [ '~Change font' ],
193 },
194
195 'align leader' =>
196 {
197 SHORTCUTS => 'A',
198
199 'Align bottom' => [ 'b' ],
200 'Align center' => [ 'c' ],
201 'Align left' => [ 'l' ],
202 'Align middle' => [ 'm' ],
203 'Align right' => [ 'r' ],
204 'Align top' => [ 't' ],
205 },
206
207 'slides leader' =>
208 {
209 SHORTCUTS => 'S',
210
211 'Load slides' => [ 'l' ],
212 'previous slide' => [ 'N' ],
213 'next slide' => [ 'n' ],
214 'first slide' => [ 'g' ],
215 },
216
217 'debug leader' =>
218 {
219 SHORTCUTS => 'D',
220
221 'Display undo stack statistics' => [ 'u' ],
222 'Dump self' => [ 's' ] ,
223 'Dump all elements' => [ 'e' ],
224 'Dump selected elements' => [ 'E' ],
225 'Display numbered objects' => [ 't' ],
226 'Test' => [ 'o' ],
227 },
228 ) ;
229  
230  
231 #------------------------------------------------------------------------------------------
232