Closed oxalorg closed 2 years ago
Interesting, I tend to not have long lines like that. I hit M-q
habitually as soon as lines start getting longer. Works well on comments, strings, and text content like markdown/org-mode.
Judging by your screenshots this is showing whitespace that isn't actually there (the indentation), which seems more magic than I'd like for corgi. I personally have no issue with your first screenshot. It shows me what's in the code, which is a couple of excessively long strings.
Before:
After hitting M-q
I agree breaking down lines at 80/120 char is the optimal solution, but unfortunately that's not always the case for every code you encounter (this usually is a problem html files).
Also, what happens when M-q
line width set is larger than your window split size? We run into the same word wrapping issue. This is why I like the magic indentation to keep things aligned regardless of my window size / line width. This is also the default behavior in VSCode and a lot of other modern editors.
We can keep this open for now, if anyone else needs it :)
The snippet you posted I think is small enough to qualify as "just loading a package + some glue", so it doesn't necessarily need to be its own package. I'm suprised this is what "modern editors" do, it doesn't seem right to me :) but I'm going to drop your snippet into my user config to test drive it for a bit.
Oh boy I can already tell this is going to be hard to get used to... I really don't think I want my editor to wrap lines
It's impossible to tell now that [parts/title]
is nested inside [title-area]
.
I think the conclusion here is that this is a snippet that people can easily add to their config if they so please. Something we could/should think about if if there's a good place where such snippets could live. I think it would be neat to have a "next steps" somewhere, where after you have the base config going you can browse some of the additional stuff that people install and configure. Will open a separate issue for that.
I've added this to my user config file to get word-wrap working more beautifully
Without adaptive word wrap:
With adaptive word wrap:
Do you think this should be enabled by default? Or maybe again we can create this as a package