-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add horizontal and vertical split scratch buffers #1763
Add horizontal and vertical split scratch buffers #1763
Conversation
|
helix/helix-term/src/commands.rs Lines 2235 to 2243 in 9bfb0ca
Should we change |
Ah yeah, sorry I mixed it up. I'd either change |
Went with the second suggestion and changed the aliases to |
Sorry, one more rebase is needed: I split the typable commands out to a separate file |
7f457f2
to
33faa2a
Compare
Make subcommand name more descriptive Fix vsplit completer Run cargo xtask docgen
33faa2a
to
6c717e4
Compare
No problem! updated the PR |
@@ -682,6 +682,10 @@ impl Default for Keymaps { | |||
"C-j" | "j" | "down" => jump_view_down, | |||
"C-k" | "k" | "up" => jump_view_up, | |||
"C-l" | "l" | "right" => jump_view_right, | |||
"n" => { "New split scratch buffer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Scratch buffer in new split"
I'm also not sure how I feel about these mappings, we can leave them in for now though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know doom emacs for this space w n
will split vertical, not sure if we want so many layers here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am probably biased as I use the scratchpad rarely but I think this would be fine without default keybindings at all. I think the typable commands are more appropriate, especially given how many keypresses these keybindings take.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely a tad deep! My argument for keeping it in here would be that when I first installed helix and played around with it, I was very much inclined to pressing space
and discovering commands through the dialog. I naturally began to start using space w
to find window commands, and felt like this was an appropriate place to put them since the other split commands were here too. Once I got into the flow of navigating this way, it didn't feel too deep IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm good point, the discoverability is nice with the space
popups. Although it also possible to discover things through the command picker (#1400), but I don't remember if that shows typable commands. I don't have strong feelings about the bindings, I would feel ok with these 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🎉
Add horizontal and vertical split scratch buffers
This change proposes the addition of two new commands to open scratch buffers in splits. It works out to be very similar to
:hsplit src/newfilename.rs
wherenewfilename.rs
is a file that doesn't exist, but with the intention of not actually creating a file when you are done with it.