You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support org_do_promote and org_do_demote in visual mode #860
I often need to promote and demote many elements at the same time, for example:
A group of headings:
* Heading 1
** SubHeading 1
** SubSubHeading 1 <-- heading to demote
** SubSubheding 2 <-- heading to demote
The content of a heading (following the case shown in #859)
* Heading 1
****** SubHeading 1
- Line 1 <-- content to promote
- Subline 2 <-- content to promote
- Line 2 <-- content to promote
The natural way for me is to select all the content in visual mode and use >> or << but it falls back to the default nvim indentation change and adds the spaces:
@kristijanhusak I have actually a question about an issue related to this feature in a more conceptual manner:
There are a couple of commands, which would be very useful in another mode than normal mode. In visual mode for example I would like to be able to add links to a selected text where a selected text gets the link description after inserting the link. When I looked at the codebase I hesitated to implement this, because the way, commands are hooked to the configuration seems to bind them very tight to normal mode.
Is this true or do I just have a misunderstanding of the code? If I am correct, do you have plans to change that? There are a couple of other things in different modes I would find useful, like org-meta-return in insert mode.
@lyz-code Sorry for kind of derailing your issue. I would actually be quite happy to see your proposed feature implemented.
Activity
seflue commentedon Jan 26, 2025
@kristijanhusak I have actually a question about an issue related to this feature in a more conceptual manner:
There are a couple of commands, which would be very useful in another mode than normal mode. In visual mode for example I would like to be able to add links to a selected text where a selected text gets the link description after inserting the link. When I looked at the codebase I hesitated to implement this, because the way, commands are hooked to the configuration seems to bind them very tight to normal mode.
Is this true or do I just have a misunderstanding of the code? If I am correct, do you have plans to change that? There are a couple of other things in different modes I would find useful, like org-meta-return in insert mode.
@lyz-code Sorry for kind of derailing your issue. I would actually be quite happy to see your proposed feature implemented.
kristijanhusak commentedon Jan 26, 2025
@seflue It's not that hard to add support for more modes. I added your suggestion in 0ef840a since I believe it's useful.
For this one is trickier because of the possible shifts between the same selected region.
celsobenedetti commentedon Mar 17, 2026
Went for a "dumber" string parsing approach here as PoC: #1117