-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout transient state refactor #6763
Comments
I agree with @quicknir here. This is something I might try to tackle, especially if others concur and have related suggestions. |
For reference, here are commands that exit the transient state (TS): (source)
And here are the commands that don't exit:
It does seem to me that we can move the TS @travisbhartwell not really related, but I noticed that @CestDiego are you still around? I think we'd benefit from hearing your input. (and you're still listed in the go-to persons page) |
@travisbhartwell here's a related suggestion: we're missing a command to add all of the current project buffers to the current layout - this is very handy after opening a project layout with (defun bm-add-project-buffers-to-layout ()
"Add all of current project's buffers to current layout.
Handy after creating project layout with [SPC p l]."
(interactive)
(let ((persp-switch-to-added-buffer nil))
(mapc #'persp-add-buffer (projectile-project-buffers)))) This got me thinking that we're missing commands for the one-project-per-layout workflow, such as:
|
IMO On the transient state x which-key issue, on the one hand the TS is too big, on the other I think using a TS looks nicer than |
But the whole point of the TS is to display the layouts. If we can find another way to show the layouts when pressing |
Indeed |
Also |
@travisbhartwell Are you still working on this? If not, I think I'll pick it up. @Andre0991 I'm not really sure what's fundamentally different about layouts, compared to buffers or windows ("for this sort of thing"). I don't have any strong feelings about TS vs which-key to be honest. It's just a matter of consistency. In an alternative universe spacemacs could just have used TS's everywhere (or much more), but that's not what happened. It's pretty jarring to get used to which key for all of the prefixes, and suddenly get this TS for layouts. @syl20bnr I'm not sure why it's strictly necessary to see the list of layers. When you do e.g. Final thought: there's a similar issue with workspaces, where currently there's just a transient state. I'd like to also have commands for workspaces from which key. If I just pull things into
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
I was taking a real look at this for the first time today, and I think the current design is a bit off/inconsistent. First off, it's an enormous transient state, large enough that by default it's keybindings are hidden. Within that though, well over half of the commands immediately exit the transient state. The entire point though of a transient state as opposed to just a prefix binding, is that you don't immediately exit it. Second, the design where SPC l immediately enters the transient state is quite different from some of the most functionally similar prefixes, SPC w and SPC b.
These two together, to me at least, suggest a pretty straightforward course: change SPC l from a transient state, into a normal prefix key. Move all, or almost all, of the bindings inside the current transient state to normal bindings under this prefix. For instance, b which goes to a buffer associated with the current layout, would just become SPC l b. So the keystroke for it would be the same. Meanwhile, move the transient state to
SPC l .
, to be consistent withSPC w .
andSPC b .
. That transient state would then have many fewer commands; mostly those that don't exist and a few others deemed appropriate.One random nitpick: is
SPC l D
supposed to be "close other layout" or "close other layouts"? The former would be a bit surprising; if you have more than two layouts it's not that clear which will be closed. I think we should aim for the latter functionality, and try to bring the same functionality to SPC w D and SPC b D (but that should be discusssed elsewhere, just mentioning it here for the sake of consistency).Final thought, to go with my recent train of buffer/window/layout thoughts: I think we should reserve SPC F for frame related commands. Hopefully in the future we can support
SPC F 2
to go to the second frame, and so on.The text was updated successfully, but these errors were encountered: