Live data from Hacker News

Lite XL: A lightweight text editor written in C and Lua

lite-xl.com

41–50 of 151 posts

Re: Lite XL: A lightweight text editor written in C and Lua

#41
post #39

Earlier quoted context omitted.

Sounds like all you need is à plugin to call makefile targets from vim.

That is a method I've been toying with. But it's still such as hassle to quickly prototype something this way. It's also near impossible to get I J K L working as the cursor keys in VIM without having some major interference.

Maybe you’d have more success with Emacs?

You could write elisp functions for your tasks and bind them to your prefered keys, with or without Evil.

Re: Lite XL: A lightweight text editor written in C and Lua

#43

Can someone suggest an editor for macOS with smart text algorithms to allow work on unlimited file size or line length? I need to view unlimited text, switch between encodings (including hex) and I want editor with proper algorithms, so it'll work instantly and without loading entire file in the memory. Should support search with fast regex engine. Editing would be nice too. I imagine editing as a sequence of actions…

It has been so long since I last used an editor that could handle very large files or long lines, that I'm struggling to remember one. Maybe SlickEdit? The Forte Agent newsreader?

The Scintilla editor widget is the cross-platform core of several good code editors, but I don't think it qualifies in this area.

I hope someone chimes in with an answer on any OS.

Re: Lite XL: A lightweight text editor written in C and Lua

#44

Can someone suggest an editor for macOS with smart text algorithms to allow work on unlimited file size or line length? I need to view unlimited text, switch between encodings (including hex) and I want editor with proper algorithms, so it'll work instantly and without loading entire file in the memory. Should support search with fast regex engine. Editing would be nice too. I imagine editing as a sequence of actions…

You want BBEdit

Re: Lite XL: A lightweight text editor written in C and Lua

#45
post #25

Uses SDL for rendering the UI. While it makes it work cross-platform it unfortunately means it won't look like a native application. Then again, I don't think there's a C library which provides cross-platform native UI, only the Lazarus toolkit for Free Pascal and WxWidgets for C++.

> Then again, I don't think there's a C library which provides cross-platform native UI, only the Lazarus toolkit for Free Pascal and WxWidgets for C++. libui seemed like it was going to be this, but it looks like there haven't been commits in almost 2 years :( (I'm mostly replying to raise visibility on libui, maybe someone will discover it/help out a bit)

There's now libui-ng [1] which seems to be active and already has many wrappers

[1] https://libui-ng.github.io/libui-ng/

Re: Lite XL: A lightweight text editor written in C and Lua

#47
post #21

I like it, very fast, but it has some issue with idle CPU usage on my M1. It stays at 70% on idle whereas sublime at 0.0% when not used, opening the same project.

Yeah; unfortunately, none of the core dev teams work on Macs, so while being known, it's hard to fix on our end. We'll get it eventually.

Re: Lite XL: A lightweight text editor written in C and Lua

#48

I stopped using lite-xl a few months back over the lack of word wrapping, but it looks like it's in as of October/v2.1.0 It's a good stopgap between vim and vscode

Yup, word wrap is now a configurable core plugin. There's still a few minor issues with it, but it mostly works as expected.

Re: Lite XL: A lightweight text editor written in C and Lua

#49
post #18
post #6

The aim of Lite XL compared to lite is to be more user friendly, improve the quality of font rendering, and reduce CPU usage. Plug-ins are not necessarily compatible

The plugin system is a disaster in this project. Basically, each "plugin" is just a Lua script that can (and often does) modify absolutely anything in the editor, including core data structures and other plugins. The original Lite was an exercise in creating a minimal editor, which I think succeeded. This project tries to take that base and expand it to add a ton of features, but doesn't re-architect it to support th…

Honestly, the thing that made me step into this project was actually this plugin interface.

Adding support for halfway decent Perl syntax highlighting took literally 5 minutes with no familiarity with the editor at all, and not having used lua in years.

It was extremely straightforward and refreshing, compared to say, writing a plugin for something like Code::Blocks.

Re: Lite XL: A lightweight text editor written in C and Lua

#50
post #46

Can this thing even word wrap? Last time I checked out Lite or some variation it couldn't even word wrap.

Yes; F10 enables word wrap. It's a plugin included in the core.

Thanks a lot!

Edit: just tried it, it works. But unfortunately it only wraps on character, so it won't work for me now. As a writer I was looking for something more lightweight than VS code, and Lite XL looks promising. I'll keep an eye on it.

Post reply on HN