-
Notifications
You must be signed in to change notification settings - Fork 236
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
Soft Line Wrapping #636
Soft Line Wrapping #636
Conversation
Adam = god 🙏🏼 |
OK; I think this is good to go, or at least, ready for testing by people that are interested. I'm sure there are bugs. And it's still pretty beefy; I feel like I could still pare this down a lot. And I need to implement the "word" mode, but this should be 'good'. |
OK, I'm decently happy with this. Obviously this is a bigger change than just the plugin (minor changes to the docview API); and it is being proposed as a core plguin, so I'll leave this up for discussion for a while. |
this is such a heavily requested feature I think it's worth it |
f8b6b8b
to
c0125ba
Compare
Should close #36 . |
Should close #585 . |
e1708ad
to
a178ee8
Compare
OK; I think this is now ready for testing. It seems to reliably work at this point for me. The only thing a little broken is some of the plugins I'm using. |
…translate around, as well as quashed some other bugs.
005508d
to
0cdaf34
Compare
Added in soft line wrapping.
Added in soft line wrapping.
I have just "discovered" Lite XL, and am very impressed. Immediately I looked for "linewrap" :/ I have installed the latest "release" available (= 2.0.5 as I type), but it looks like this is going out in a 2.1 release. Can I try the Thanks! This looks very promising! |
Sadly no, the |
Thanks for the reply. I'm looking forward to the 2.1 release with keen anticipation! 😉 |
You can download a preview release here for Linux and Windows: https://github.com/adamharrison/lite-xl-simplified/releases/tag/continuous if you want to try it out. |
@adamharrison , I have two observations:
Edit: PS I'm on your Lite XL Simplified, downloaded yesterday. |
Thanks - I did! And it's great to see this feature being implemented. My take tallies exactly with @humanplayer2 in the comment above this one. I generally use a "lite" editor for long-form writing (typically, but not always, markdown), so having "soft line-wrap" is almost essential for me. This is very much a step in the right/write ;) direction, though. The speed of Lite-XL is really impressive! |
@humanplayer2 This is actually configurable, in you user plugin, you can set
Ah, good call. I'll open an issue.
Awesome, glad to hear it.
@dajare Awesome; you may be interested as well in https://github.com/adamharrison/write-xl; it doesn't have any releases, but I can just add some CI to it; I also do some long-form creative writing in markdown, and I compiled it onto my tablet so I can take it with me in cafés and stuff. It's not perfect or anything, but I like it a lot more than google docs and whatnot for my purposes; might fit your needs as well. |
@adamharrison : Genius! This just gets better and better. :) Works a treat.
Write-XL looks super, too! I don't have any Android use for it (I only have an old Nokia phone, no tablet). But I'll be firing up Lite-XL on Ubuntu regularly, I imagine. I also have Typora that I use for yet more serious "long-form" writing in Markdown (with footnotes, etc.), and it meets my needs pretty well. |
when i use it pres F10 i take this bug all the time |
Sadly line wrapping isn't compatible with every plugin yet, so try disabling some to find the culprit. |
An ongoing PR where implementing soft line wrapping.
I've managed to implement it as a plugin; I think that's probably the best place to put it, as it's not really core to the editor; but it is a very common ask. (#326, #36, numerous times on discord, etc..)
The only changes I've made to the core (beyond the plugin), are making things a bit clearer in the
DocView
by renamingidx
toline
where appropriate, and ensuring that the variousdraw_line
functions return the height of the line they're drawing (as with this plugin, a variable line height is possible). This will have to be paired with plugin changes, as several plugins override these functions, so this should be paired with a mod-version bump, and upgrading these plugins to support that kind of change if we want to merge this.Currently the plugin is semi-functional, but is incredibly verbose and needlessly repetitive, and highly inefficient. I'll be refining it over the coming days to get it up to snuff; hopefully cutting down the size and complexity significantly and having it incrementally compute the linebreaks, rather than recomputing the entire document on every keystroke.
Example here:
example.mp4
: