-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Automatically generate book documentation of all commands #3840
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
Conversation
a17c446
to
12f7360
Compare
35a4be1
to
16c3b1b
Compare
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.
This is looking good! Added a few comments/questions/thoughts. My 0x10.
@@ -163,7 +193,6 @@ pub fn default() -> HashMap<Mode, Keymap> { | |||
|
|||
"A-:" => ensure_selections_forward, | |||
|
|||
"esc" => normal_mode, |
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.
When we get plugins, it may be good to still trigger the normal_mode
, so plugins can react to the fact that the user wants to opt out (close modals or whatever). Unless the plan is for the modals/plugins to all specify their escape much like the current ones do such as space k.
Just my immediate thoughts.
helix-term/src/commands.rs
Outdated
goto_line_end, "Goto line end", | ||
goto_next_buffer, "Goto next buffer", | ||
goto_previous_buffer, "Goto previous buffer", | ||
no_op, "Do nothing", [], None |
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.
Sorting the commands by 1) category (None
, Movement
, ...) then alphabetically then aligning the different parts vertically would make it much easier to read this block
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.
Sorting it alphabetically would separate many related commands that are currently next to eachother, for example prepend_to_line
and append_to_line
.
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.
Good point. Then only by category maybe ? I feel like making this easier to maintain will only help as more commands are added, but I don't know if there is a good way to do it
c213eee
to
beae893
Compare
Add it in with the macro
Recursive version that has a seperate table for every "mode", currently a bit greedy with what counts as a mode, but it's good enough for now. ¯\_(ツ)_/¯
Also add space after commma
Don't show keybindgs in select mode that are the same as in normal mode
Automatically generated table of contents of different modes and sub modes.
Before Window mode would appear twice. Once under Normal, and a second time under Space.
Since the prompt and the picker don't use a keymap and instead are hard- coded, for now, I added documenation for them in the files `book/src/keymap/picker.md` and `book/src/keymap/prompt.md`. NOTE: Unlike the rest of the keymap documenation, this is not auto- generated
1a3c8aa
to
53b621a
Compare
That's not on you, nor for this PR to fix, but the |
53b621a
to
0bf820d
Compare
closing this PR as stale, thank you for contributing! |
Resolves #3705
Currently very much WIP.