neorg
neorg copied to clipboard
Add virtual indention
Issues
- [X] I have checked existing issues and there are no existing ones with the same request.
Feature description
The plugin "nvim-orgmode/orgmode" has the same practice of indenting the contents of the file, though it has another feature called "virtual indentation" which uses nvim 0.10 features (I'm unaware of the specifics) to create purely visual indentation. So no indents are baked onto the file itself.
This, coupled with an option to remove auto indents, would work a lot more like org-mode's indents option and be a lot less of a hassle to work with. It would have to be an optional feature in the config though, there's benefits in the current way (such as easier word wrapping with gq/gw)
Help
No
Implementation help
No response
I've been curious about this and whether it is a stylistic choice to have whitespace indents instead of virtual indents. When reading things in the norg spec on github, where it gets rendered as raw text only, having the whitespace indents is quite nice. I can imagine it is "more visually portable" as such.
However, it has lots of mental cost and "why did that happen? I didn't mean for it to indent like that!" challenges both in UI/UX, and when exporting to/from other formats. For the UX part, I've found myself beginning to get confused about nvim-orgmode for similar reasons. Here are some challenges off the top of my head, specifically around whitespace indentation and headings - what does the user expect will happen if they do:
-
>G
in the middle of a file with headings -
>>
on a line that has whitespace indenting, inside a heading -
=G
in a headline when the current line has no whitespace indenting but the rest of the headings below does -
<5j
on a headline that has text inside of it that, for some reason other than norg whitespace formatting, has indentation (for example how quotes may be formatted when pasted in from elsewhere)
The more I think about it, the more I feel like the sheer UX and "dwim" (do-what-i-mean, common in org-mode and likely a big part of why Doom Emacs is so popular) challenges would make managing whitespace a never ending struggle for Neorg. At the very least, a slew of user issues could be avoided by having a setting for real or virtual indentation. Not sure if that exists 🤔