-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
toggle checkbox -> cycle checkbox? include OrgTSCheckboxHalfChecked #589
Comments
I'm actually not aware, that this behavior exists in Emacs. The half-checked checkboxes are used in hierarchical checkbox trees. If only some of the underlying checkboxes are checked, the parent checkbox get's half-checked automatically. I'm not sure, what @kristijanhusak would say. My personal oppinion is, that such a feature needs to be optional and could be enabled by a configuration value. For me it would be annoying most of the time, because I just want to toggle my checkboxes fast. Furthermore I would suggest |
I'm not coming from emacs, and not familiar with how it's done there. I just think it's kinda strange to have a keymap that includes 2 out of 3 possible statuses for items. I agree about |
@RayJameson there actually exists something similar in emacs orgmode: https://orgmode.org/manual/Checkboxes.html#index-C_002dc-C_002dc-6
However, I don't see anything about changing the cycle. I think that is on purpose, referring to the checkbox-state manipulation as a 'toggle' and not a 'cycle', which would infer only two states. I'd say this sounds more like a new keybinding actually. |
@jgollenz the idea came not from orgmode, but from me. 1st scenario: empty box 2nd scenario: checked box 3rd scenario: half-checked box Those scenarios would require storing the initial state of the box If this is too much, a separate keymap for cycling should be fine |
First of all, nvim-orgmode tries to be a faithful port of orgmode, so replicating the behavior described in the orgmode docs is our immediate goal. The cycling you described, if implemented, would have to live behind a config flag, as @seflue suggested, since it is not part of orgmode. As for the behavior you described, I'm not convinced that it is easy to grasp. We would need to implement a timer to decide whether we are already coming from one of the scenarios or if we are starting one from the top:
Would you expect Perhaps this can work, but I'm skeptical. In any case, custom features are not our priority as there are enough actual features of orgmode we are missing. But nonetheless I encourage you to try it out implementing yourself 🙂 If it's convincing we might merge it into the project. If not, you still get the behavior you want in your personal fork. |
@jgollenz The simplest version would be just a boolean flag to enable or disable the feature (disabled by default) and when enabled, on toggle the |
@RayJameson To give a bit more context how it is handled in Org mode: Emacs has the notion of a prefix argument and a "universial prefix". In Org-mode this prefix is used to manipulate the behavior of org-toggle-checkbox to achieve the intermediate-state (see org manual). I don't know, how we could transfer this into a proper Vim workflow. @jgollenz Any ideas? |
Does this feature exist in Emacs orgmode core?
N/A
Orgmode link
No response
Feature value
Would be cool if the checkbox toggle included OrgTSCheckboxHalfChecked, I'm not sure about the value, but I expected it to work like that in the first place.
[ ] -> [-] -> [x]
Additional context
No response
The text was updated successfully, but these errors were encountered: