intellimacs
intellimacs copied to clipboard
Change `SPC w m` to toggle maximize window
Description
This PR removes the current behaviour (HideAllWindows) of SPC w m
which is defined under "extras". The removed behaviour still exists at SPC T m
(defined under "extras").
Instead, I defined SPC w m
under "spacemacs" to toggle the maximization of the current window. Pressing it onces will maximize the size of the split, and pressing it again will unmaximize the split.
As far as I understand, this closely matches actual Spacemacs behaviour. Source:
- https://develop.spacemacs.org/doc/DOCUMENTATION.html#:~:text=SPC%20w%20m,to%20delete%2Dother%2Dwindows)
- https://www.reddit.com/r/spacemacs/comments/a1djxx/whats_your_window_layout/eapqhyw/
- https://gist.github.com/heroheman/befa66b5b4dc5d94682206ece4a91a18#:~:text=SPC%20w%20m,toggle%20maximize%20window
This also seems to mostly match the behaviour of VSpaceCode:
- https://github.com/VSpaceCode/VSpaceCode/blob/3a5f908feb65fd88c3e2c5ec7f3eb5ea7c3bf7c0/CHANGELOG.md?plain=1#L52
VSpaceCode seems to alter slightly from this PR. My suggested SPC w m
maximizes the width of the current panel, which in effect makes all the other splits smaller. VSpaceCode used to work like this, but instead eventually changed SPC w m
to truly maximize the current split, making other splits invisible. This behaviour I'm not sure that I can replicate in IntelliJ.
I suggest that if a new user who is used to Spacemacs and only imports "spacemacs" and not "extras", tries SPC w m
, my suggested behaviour is close enough to what they would expect to happen.
You might argue that I should leave the existing binding and just make my new binding under SPC w M
instead. I think a new user who tries SPC w m
is still bothered as its behaviour doesn’t seem to match what Spacemacs does. Instead, it just toggles hiding all tool windows. If you don't have those open, it does nothing to "maximize" the current split.
To sum up:
- for users who only use the "spacemacs" import, this adds a new command
SPC w m
that previously seems to have no similar action under this namespace - for users who also use the "extras" import, this removes
SPC w m
but they can access the same behaviour underSPC T m
instead
Checklist
- [x] I have read CONTRIBUTING guidelines.
CHANGELOG:
- [x] Updated
- [ ] I will update it after this PR has been discussed
- [ ] No need to update
KEYBINDINGS:
- [x] Updated
- [ ] I will update it after this PR has been discussed
- [ ] No need to update
PLUGINS:
- [ ] Updated
- [ ] I will update it after this PR has been discussed
- [x] No need to update