Skip to content
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

Tune autoindentation behavior #624

Closed
1 task done
anuvyklack opened this issue Oct 14, 2022 · 1 comment
Closed
1 task done

Tune autoindentation behavior #624

anuvyklack opened this issue Oct 14, 2022 · 1 comment
Labels
feature Issues related to feature proposals. Please attach a module.

Comments

@anuvyklack
Copy link

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

I open this topic first in the discussions #614, but have no responses. So, I assume, that this does not implemented yet, and open a feature request. Copy it here.

I like to structure definitions in a way similar as Vim documentation do:

* Head 1
** Head 2

   $$ Definition
                               Multiline descripton: Lorem ipsum dolor sit amet,
                               officia officia excepteur ex fugiat reprehenderit
                               enim labore culpa sint ad nisi Lorem pariatur
                               mollit ex esse exercitation amet. Nisi anim
                               cupidatat excepteur officia.
                               $$

But on every Enter press or if a enter insert mode anywhere inside indented line, when I press Esc, the line jump to posotion under Head level:

* Head 1
** Head 2

   $$ Definition
   Multiline descripton: Lorem ipsum dolor sit amet,
   officia officia excepteur ex fugiat reprehenderit
   enim labore culpa sint ad nisi Lorem pariatur
   mollit ex esse exercitation amet. Nisi anim
   cupidatat excepteur officia.
   $$

Since Neorg is indentation agnostic, is it possible to tune the autocommands behavior the next way: check the structure level and if it less than the threshold, shift the line to the right. But if indentation level is bigger than the threshold --- do nothing.

Help

No

Implementation help

No response

@anuvyklack anuvyklack added the feature Issues related to feature proposals. Please attach a module. label Oct 14, 2022
@vhyrro
Copy link
Member

vhyrro commented Jun 7, 2023

Took me a while to get around to this feature, but it's now implemented as part of 5.0.0! Set the dedent_excess option in core.esupports.indent to false to get the behaviour you want :)

@vhyrro vhyrro closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues related to feature proposals. Please attach a module.
Projects
None yet
Development

No branches or pull requests

2 participants