Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Indenting word wrapped lines while editing? #352
Can any of the editors indent word wrapped lines while in edit mode?
Meaning, if you start a line indented and it ends up wrapping to the next line, the next line is indented the same amount (or, optionally, one level more).
I only saw this feature in the preview/view modes of a couple, whereas most desktop notepads allow this while editing. E.g., Notepad++ calls it "Aligned Line Wrap" or "Indent Line Wrap", and Notepad2 allows you to "Wrap indent as first subline" or "Wrap indent 1 level more than first subline".
It's a feature that really improves the legibility and organization of a note when applying hierarchical or nested indentation. I think it's also relatively common for code in order to see logical structures more easily.
Thanks for the reply. I do not see any of those three indenting wrapped text.
I checked the others again and these do it but in preview mode only:
There is this CodeMirror demo which does it by changing the renderLine event:
And another CodeMirror demo which uses the above and also detects "-", ">", "1." as part of identation: