Add 'SPC w' leader bindings for window resizing

For convenience they directly enter the window manipulation transient state,
since resizing operations tend to involve repeated key presses.
This commit is contained in:
yuhan0 2018-10-27 20:26:21 +08:00 committed by duianto
parent 446299ffbd
commit f961d622cf
2 changed files with 10 additions and 2 deletions

View File

@ -2207,6 +2207,10 @@ Windows manipulation commands (start with ~w~):
| ~SPC w w~ | cycle and focus between windows |
| ~SPC w W~ | select window using [[https://github.com/abo-abo/ace-window][ace-window]] |
| ~SPC w x~ | delete a window and its current buffer (does not delete the file) |
| ~SPC w [~ | shrink window horizontally (enter transient state) |
| ~SPC w ]~ | enlarge window horizontally (enter transient state) |
| ~SPC w {~ | shrink window vertically (enter transient state) |
| ~SPC w }~ | enlarge window vertically (enter transient state) |
Split the current window into multiple ones, deleting all others using the
following commands:

View File

@ -702,8 +702,12 @@ respond to this toggle."
("v" split-window-right)
("V" split-window-right-and-focus)
("w" other-window))
(spacemacs/set-leader-keys "w."
'spacemacs/window-manipulation-transient-state/body)
(spacemacs/set-leader-keys
"w." 'spacemacs/window-manipulation-transient-state/body
"w[" 'spacemacs/window-manipulation-transient-state/spacemacs/shrink-window-horizontally
"w]" 'spacemacs/window-manipulation-transient-state/spacemacs/enlarge-window-horizontally
"w{" 'spacemacs/window-manipulation-transient-state/spacemacs/shrink-window
"w}" 'spacemacs/window-manipulation-transient-state/spacemacs/enlarge-window)
;; end of Window Manipulation Transient State