7 ms·
Lite XL: A lightweight text editor written in Lua
- Matthias1 5y agoThis seems to just be a fork of Lite[0] that supports better text rendering. Lightweight GUI text editors are shocking hard to find. The primary reason I am not using Lite is the issues with Mac. So I’m definitely going to try using this. [0]: https://github.com/rxi/lite https://github.com/rxi/lite
- nikodunk 5y agoI agree and will try it to. Question - I couldn’t discern whether it has built-in terminal access? Or does that no longer qualify as lightweight?
- sigzero 5y agoI do not think it has it built-in. There is a console plugin for running commands but I do not think that is a full blown terminal either.
- Snetry 5y agoThere is a plugin[1] that adds terminals but Lite-XL still has a shaky plugin api for anything extensive [1] https://github.com/benjcollins/lite-xl-terminal/# https://github.com/benjcollins/lite-xl-terminal/#
- jcelerier 5y agolightweight and "good text rendering" are by essence incompatible, you need at the bare minimum the unicode database somewhere which is already at least a couple dozen megs. Add to this freetype and harfbuzz if you want text rendering to be consistent across platforms, an emoji font because it's 2021, and we're nearing 40 megs just for being able to render random text properly
- frankohn 5y agoYou are right here for the unicode part. In term of quality of the text rendering I think we managed to be pretty good without introducing too much complexity or dependency, just the Freetype library. We chose a very specific approach where we completely bypass the OS API for font rendering and we render ourselves the text using the freetype library. Otherwise, for the unicode part we are on the choice done by rxi. We support unicode but not every possible characters and we don't have, notably, support for Asian languages but we support russian, greek and some more unicode characters. For the moment we choose not go for the harfbuzz library so we don't have support complex text layouts and we don't support ligatures. The problem is that harfbuzz bring quite a lot of dependencies and complexity. In other term rxi chose a nice compromise to have most of the features needed by a coding editor with unicode support without bringing the huge complexity of having to support every possible language or text rendering features. With Lite XL we didn't deviate from this approach.
- wiz21c 5y agoOh, I'm surprised. Isn't most of this provided by the operating system itself ? I thought so.
- analognoise 5y agoThe wheel is rounder when we re-invent it in JS.
- 5y ago
- enticeing 5y agoTextadept[1] is also quite nice, and configured (but not written) in lua. It seems to work fine in MacOS, but I haven't used it extensively. [1] https://orbitalquark.github.io/textadept/ https://orbitalquark.github.io/textadept/
- lr1970 5y ago> Textadept[1] is also quite nice, and configured (but not written) in lua. It seems to work fine in MacOS, but I haven't used it extensively. [1] https://orbitalquark.github.io/textadept/ https://orbitalquark.github.io/textadept/ Straight from your link above: > "... the editor consists of less than 2000 lines of C code and less than 4000 lines of Lua code." So it is written in Lua and C (mostly for graphics widgets).
- bachmeier 5y agoAn important thing to note: It has similar customizability to Emacs, but you write your functions in Lua rather than Lisp. It's more than a text editor.
- MarcusE1W 5y agoI have used lite-xl a bit and how I understand it is that lite-xl aims to add a few comfort functions for the user (PRs are accepted for that) and lite (without -xl) gives you a very minimalist experience. So whatever you prefer you can choose. (Next to the already mentioned rendering changes)
- bityard 5y agoI'm not familiar with either project but "just a fork" does not seem to be an accurate description. Lite-XL has many more commits and seems to be much more actively maintained. Lite's last commit was about 10 months ago, the last release more than a year ago.
- widdershins 5y agoDoes this really warrant a fork? Couldn't better font rendering be merged into Lite? It's an interesting and quite new text editor. Getting traction for a new editor is hard, and having multiple forks seems like it could make it even harder.
- asicsp 5y agoHere's the full reasoning mentioned in the README: >The aim of Lite XL compared to lite is to be more user friendly, improve the quality of font rendering, and reduce CPU usage.
- frankohn 5y agoAuthor of the Lite XL fork here. The reason why I started a fork of Lite is that rxi, the author of the original project, refused to merge my proposition to improve the font rendering. He didn't want to bring too much complexity to the project. In more general terms the author or Lite, rxi, values a lot simplicity in term of coding implementation even when some things are unfriendly or annoying for the user. So my decision was to fork Lite to create an alternative project that has a different compromise between simplicity and user friendliness. Now Lite XL has a small but awesome group of contributors to the project. We still value simplicity and we are trying to keep a good balance between features and complexity of the implementation but our main goal for the editor is to be friendly and useful as a general purpose coding editor. I have a very high opinion of rxi. To me the original project, Lite, is a constant source of inspiration. Even if we have made a fork of its project we highly value the principles and software practices established by rxi.
- stephc_int13 5y agoThe font rendering of Lite was the main issue of the editor last time I checked. The project is impressively small and light, and quite snappy from what I can tell. I am a bit reluctant to switch editor again as I am happy with Sublime Text 4 and I don't need to change, but I think the approach here might be superior. I prefer using Lua than Python for configuration and customization. Very nice work!
- BiteCode_dev 5y agoCan you share with use what are the benefits of Sublime Text 4 over version 3? I bought the licence for 2 and 3, but struggle to find a reason to upgrade.
- WD-42 5y agoThe LSP project brings it up to par with vscode for auto completed and introspection, the adaptive theme that lets you change the ui/color theme depending on what mode your OS is ok is also great.
- BiteCode_dev 5y agoCan you use Pylance with it?
- nisegami 5y agoI believe Pylance is closed source but based on the open source Pyright. There appears to be a plugin for using Pyright with Sublime Text: https://github.com/sublimelsp/LSP-pyright https://github.com/sublimelsp/LSP-pyright
- frankohn 5y agoMany people are going to compare Lite XL to Sublime Text and VSCode so I would like to make a few comments about the comparison. Sublime Text is a more mature and has more resources than Lite XL. As far as I know it has a team of engineers dedicated to its development. It makes for an excellent editor and it is hard for Lite XL to compete. To my eyes the main reasons one *may* want to use Lite XL over Sublime Text are: 1. because Lite XL is free software 2. because customizing Lite XL using Lua is quite easy and fun If you are okay with being non free and you look at the features you may prefer Sublime Text and that's fine. Personally I moved from Sublime Text to Lite XL just because it isn't free. It is not only a matter of the cost of the license but also about the fact of being free software. If we speak about VSCode, it also has a ton of features more than Lite XL, a formidable set of plugins and growing and big company behind it with dedicated engineers so it is well placed to be much better than Lite XL. In reality, personally, I never used VSCode even before Lite XL, I was just using Sublime Text. The reasons I *personally* cannot tolerate to use VSCode is that: - it is slow to start, and it starts incrementally - the UI it is somewhat flickering, in the syntax highlighting and in the menu (for linux only) - it has a ton of popups, bells and whistles that are annoying to me. This is much a matter of personal preference. May people are tolerant to some slowness and some occasional flickering to have more features. In this case they may prefer VSCode and this is fine too. I personally prefer when the editor gets out of the way being fast, responsive and still nice on the eyes. In addition it is free software and easy to hack and this is very important too.
- deleted 5y ago[deleted]
- kruxigt 5y agoNon rhetorical question: what is the reason for this to exist? How does it compare to other text editors such as Sublime?
- jakearmitage 5y agoWhat was actually improved? Hinting? Using harfbuzz?
- frankohn 5y agoLite XL use the freetype library for font rendering instead of the stb_truetype library. Using the freetype library we do hinting but only in the vertical axis and subpixel rendering and positioning along the horizontal axis. This is the so called "slight" hinting and it was used with subpixel rendering. The original Lite on the other side doesn't do any hinting and is not doing subpixel either, it just does grayscale rendering.
- buckbee 5y agoIn order to reduce complexity in the main project, can’t you separate freetype into a tool that caches fonts as bitmap glyphmaps, and use the glyphmaps directly? That way, the editor itself doesn’t need to worry about that.
- frankohn 5y agoLooks like more complexity and that would prevent users from changing fonts in their preferences.
- jakearmitage 5y agoRight now, how does it work? Does it build a glyphmap everytime the editor starts?
- bogwog 5y agoThis looks great! I've been looking for an open-source alternative to Sublime ever since the relatively underwhelming ST4 release. An interesting one I found was CudaText (https://cudatext.github.io/ https://cudatext.github.io/), which has a lot of features and is a solid editor but... it's written in Free Pascal. That's not a technology I want to deal with for what would be my #1 tool. I'll definitely be trying this out for myself soon, but it'd be helpful if you could include some side-by-side screenshots comparing the font rendering of your fork to the original, considering that's one of the main differences.
- asicsp 5y ago>it'd be helpful if you could include I'm not the author, just sharing the repo here. I'd suggest to open an issue.
- webmobdev 5y ago> but... it's written in Free Pascal. That's not a technology I want to deal with for what would be my #1 tool. I didn't understand your point and would appreciate some more clarifications. For me, even if we ignore the fact that Pascal and its derivatives are 20+ year old mature languages, why does the programming language really matter if the tool built with it works to your satisfaction, and as intended? In fact, Object Pascal (and not Pascal) with FreePascal + Lazarus IDE is actually a smart choice here as it allows you to develop multi-platform application easily with the same codebase. That is how CudaText is available for nearly all the popular platform (and even on some of the niche platforms e.g. xBSD OSes). Check out the open source Lazarus RAD IDE - https://www.lazarus-ide.org/ https://www.lazarus-ide.org/ as it is a hidden gem for multi-platform development that not everyone is really aware of.
- bogwog 5y ago> why does the programming language really matter if the tool built with it works to your satisfaction, and as intended? Because the reason I'm looking to move away from ST4 is because I was disappointed with the features and pace/direction of development. I want an open source text editor that I can customize however I want (and possibly embed in my projects), so something written in a language I have no interest in and/or dislike isn't going to work for me.
- pull_my_finger 5y agoOne thing that bothered me about Lite editor, was that you couldn't change your working directory in Lite. Is this fixed/implemented in Lite XL?
- bogwog 5y agoYeah, you can change the current folder with the `Core: Change Project Folder` command, and you can add/close folders with `Core: Add Directory` and `Core: Remove Directory`. (These are run with CTRL+SHIFT+P)
- biryani_chicken 5y agoAfter using vscode for a while, lite is amazingly fast. It is now my default editor for things that don't need a specific vscode extension.
- madis 5y agoWhy?
- schipplock 5y agoTextadept is another lua-based text editor ( https://orbitalquark.github.io/textadept/ https://orbitalquark.github.io/textadept/).
- hknapp 5y agoI wish there was a lightweight GUI editor that supported LSP plus a few other IDE functions
- ogwh 5y agoThere's an LSP plugin for this editor listed on one of their plugin pages (I think the external plugins page). I've yet to try the editor or the plugin though.
- jmiskovic 5y agoIt's great to see lite on front page - such an incredible feat of engineering, making a cozy editor in less than 5k LoC of Lua (plus the C host). Robust text editing, syntax highlighting, command palette, pane splitting and management, plugin support and more. Writing plugins is simple and powerful. The original lite and Lite XL are meant to run on desktops. I've recently started my own fork of lite[1] that allows it to run in VR environment. Once done I plan to use it as a competent editor for a VR-first development environment. I'm really digging the simplicity of Lua as a platform. [1] https://github.com/jmiskovic/lite-lovr https://github.com/jmiskovic/lite-lovr
- jakearmitage 5y agoDoes this support multiple carets?
- dflock 5y agoYes.