-
Notifications
You must be signed in to change notification settings - Fork 56
feat: support for orgmode style cycling #92
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
base: main
Are you sure you want to change the base?
Conversation
@neo451, wow, that was quick. I just gave it a a test run. First of all: much better than the default folding behavior. I missed it :) I think I could create a few edge cases / inconsistent behavior. When the cursor is on a checklist, Here it toggles the list, fine. But when I'm on a listitem a bit further down, it toggles the entire heading.
More testing by anybody is highly welcome. |
Oh, and as always, we should add docs :) Side note: yes, plugs are handy. I also think that our user commands are a bit to unwieldy. Not because they are not plugs, but because they contain a lot of logic. I with more of the logic was just a lua function that I could easily use to script custom things. But sometimes useful functionality is hidden within the user command and you cannot use it as only the function for the command itself is exposed. Just to get an idea about the complexity of the commands:
|
shift+tab is due to some kitty settings on my end. will fix it tomorrow and give feedback. Edit: fixed it. global cycle works like a charm! |
I just checked nvim-orgmode and the implemented behavior is different that what I get in this PR. The orgmode implementation does not toggle lists. I wonder if we can specify tests for this. Do screen tests work for this?! :) |
I've been using this branch for the last little while and I don't want to miss it anymore. Especially for bigger files, this is very useful. @neo451 why don't we merge this and improve it as we go along? |
Ah yes, I forgot about this. I think I can pick this up again, trying to address the little points you mentioned a couple of times back then and I found I don't have a good mental grasp of how the folding thing worked, I can give it a try again, but like you mentioned we can merge the current one anyway. |
@sotte
Adpated from nvim-orgmode, works pretty well for me, try it out!
I also made the smart action use this. In order to do that I realized I could use
<Plug>
mappings, which leads me to think we have a bit of a too verbose command system, stuff likepaste_img
,extract_note
is not really that great to use as a user command, I am not talking about deleting them, but I think we should provide more<Plug>
mappings, and new feature that is not worth to be a command can go in this direction as well.