I want to use Kakoune to write markdown files, but find that the soft wrap around around bullet points makes them harder to read.
Current Behavior:
List:
- example bullet
point 1
- example bullet
point 2
This is is what i would want to happen:
List:
- example bullet
point 1
- example bullet
point 2
I have been struggling to achieve this behavior with soft wrapped lines, by probably misunderstanding how regional highlighters work. I also tried this by editing the markdown.kak directly and it would nice to know if this is the best way to do this.
You may be interested in the -indent and -marker xx options for the wrap highlighter.
The -indent option makes wrapped lines start at the same indent level as the first line, turning this:
Here is a list:
- here is a list item that has an extreme
amount of text in it
- yet another very long list item, you'd
think I have said everything already
…into this:
Here is a list:
- here is a list item that has an extreme
amount of text in it
- yet another very long list item, you'd
think I have said everything already
The -marker xx option inserts xx between the indent and the wrapped text. It’s often used to add a little icon to make it clear that the text is wrapped, like -marker ↪, but you can just set it to two spaces (-marker ' '), producing:
Here is a list:
- here is a list item that has an extreme
amount of text in it
- yet another very long list item, you'd
think I have said everything already
…which looks quite nice.
Of course, with Markdown you can use semantic line breaks even in list items, which I find works much more comfortably with editors like Kakoune.
I think I need to formulate my question better.
How can i add the highlighter addhl wrap -word -indent -marker “ “ just when soft-wrapping lists and use addhl wrap -word -indent for everything else instead? (else longer paragraps look weird outside of lists) I tried looking at the markdown.kak, but didn’t understand how it uses regions.