News for hackers. Stuff that matters.
Re:Zee: A modern text editor for the terminal written in Rust by drekipus on Tuesday March 29, 2022 @11:02PM (#30851128)
Looks nice. I do like tui editors, I like new editors, I like the "promise" of speed / rtc that comes with rust. I like new and interesting ways of doing things

This looks to be a hobby project, and it looks very professional and presentable, so good work! I like it!

But if you wanted to entice me to download and try it, I'd argue you have to give me something new. I would prefer more reasoning about why things are the way they are (keybinds are done because X). I'd prefer something that can be hacked upon (vim, Emacs, kak, etc all have scripts). I'd prefer something different (the entire window has physic simulation and typing too fast causes a massive loading force on the indents). Etc.

But this is your project, do what you want! well done!

Re:Zee: A modern text editor for the terminal written in Rust by rob74 on Tuesday March 29, 2022 @11:41PM (#30851282)
Not the author, but you can hack on it - you just have to install Rust!

Another editor worth mentioning here is Micro (https://micro-editor.github.io/), written in Go, which is also a TUI editor, is hackable not only because open source but also in the sense you mentioned (with plugins written in Lua), and (exceptionally for a TUI editor) it has the "usual" default keybindings that all of us non-Vim and non-Emacs diehards are accustomed to (Ctrl+S for save, Ctrl+F for find etc. etc.).

Re:Zee: A modern text editor for the terminal written in Rust by rahen on Wednesday March 30, 2022 @03:11AM (#30852266)
Last time I tried micro as an alternative to vi, it didn't even implement search and replace. I find most of those alternatives quiet heavy and featureless compared to vi.
Re:Zee: A modern text editor for the terminal written in Rust by PBondurant on Wednesday March 30, 2022 @06:52AM (#30853521)
fwiw the current Micro (2.0.10) certainly has these...<Ctrl-f> for search, 'replace' [search] [value] [flags]' and 'replaceall [search] [value]'.
Re:Zee: A modern text editor for the terminal written in Rust by Semaphor on Wednesday March 30, 2022 @07:22AM (#30853673)
An issue with micro is, that you can’t use the mouse to select, copy, and paste text when SSHing in from a Windows host (easily). I never bothered to read up on why this is an issue for Micro but not Nano, but something is done different.
Re:Zee: A modern text editor for the terminal written in Rust by girvo on Tuesday March 29, 2022 @11:32PM (#30851247)
One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

This is something I've wanted back when I was doing professional PHP development, when life was still in black and white. I still reckon it would be useful today.

I started to build exactly that myself, in Nim, but got distracted building the editor itself and eventually moved on to other personal projects. Maybe I should revisit it.

An example, based on the current HN home page, would be htmx integration in HTML editing, that is aware of the rest of your project and how htmx works to give excellent, powerful autocomplete within your bindings. Maybe even have it be able to be aware of the backends route set!

Re:Zee: A modern text editor for the terminal written in Rust by kmarc on Wednesday March 30, 2022 @01:16AM (#30851720)
> One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

But... Don't they already do that? I am a daily vim user and there is a million plugins that were created using those "hooks" you talk about. I guess that's the case with emacs too.

Just two days ago I jumped into a huge bazel project and needed a good way to navigate through 100s of files that are connected through @funny//labels/across/directories/and.files. By only reading vim's :help, I was able to write that 10lines of code which hooks into the existing "go-to-file" or "find-where-this-is-defined" functionality.

(In fact, after "implementing" this feature, I was wondering how I'd do this as a user (not as a plug in author) in any other editors.)

Re:Zee: A modern text editor for the terminal written in Rust by girvo on Wednesday March 30, 2022 @08:50PM (#30862627)
Vim and Emacs are the closest, but not quite what I had in mind either -- LSPs get closer, though have issues with mix-mode files (as does nearly every editor really). I have a design doc I wrote up somewhere, I should dig it out.

It was borne specifically out of my difficulty extending Vim to do what I was after when working with PHP frameworks!

Re:Zee: A modern text editor for the terminal written in Rust by peakaboo on Wednesday March 30, 2022 @03:09AM (#30852251)
Vim is amazing.
Re:Zee: A modern text editor for the terminal written in Rust by akavel on Wednesday March 30, 2022 @03:47AM (#30852445)
Consider taking a look at: https://orbitalquark.github.io/textadept/. It's a rather "old kid on the block" actually, it's quite minimal ("Relentlessly optimized for speed and minimalism over the years, the editor consists of less than 2000 lines of C code and less than 4000 lines of Lua code") and it is crazy extensible; actually in my experience trying it, I found it too much extensible - it was too easy for me to break it while trying to configure it. Anyway, IMO it's a project definitely worth taking a look at. (Note: if it's not immediately obvious from the website, it does have a terminal UI version.)
Re:Zee: A modern text editor for the terminal written in Rust by girvo on Wednesday March 30, 2022 @08:54PM (#30862650)
Indeed, Textadept was one of my go-to editors for this, and scripting it in Lua was fantastic! But again, it's not quite what I am after, and I'm obviously explaining it badly :)

Basically, I'd like the editor to understand the AST of the language(s, including mixed-language files, which is really hard) and be able to hook into parts of that AST to say "while this is a string, it's really this weird DSL that hooks into Javascript, so look for symbols here, here and here".

Its definitely possible to make Vim, Emacs and TA work this way, but its a lot more work than I had in mind, when I tried to extend them (well, not Emacs. It might be best at this, I'm just not a good emacs user) to achieve what I was after at the time, which was understanding the dependency injection annotation patterns from Symfony in PHP.

I think one could get pretty close with LSPs and the powerful AST parsers we have nowadays. Though doing it fast might be difficult!

Re:Zee: A modern text editor for the terminal written in Rust by andai on Wednesday March 30, 2022 @08:23AM (#30854135)
See also: Lite, written in C and Lua https://news.ycombinator.com/item?id=23126458

I use the lite-xl fork https://lite-xl.com/

Re:Zee: A modern text editor for the terminal written in Rust by zozbot234 on Wednesday March 30, 2022 @03:53AM (#30852478)
Shouldn't autocomplete be provided by LSP these days? It's an interoperable framework, so you can implement it just once for your preferred language/workflow and then just use it anywhere.
Re:Zee: A modern text editor for the terminal written in Rust by WhyNotHugo on Wednesday March 30, 2022 @08:04AM (#30853981)
> One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

Neovim?

Re:Zee: A modern text editor for the terminal written in Rust by mateuszf on Wednesday March 30, 2022 @04:14AM (#30852591)
> One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

Sounds like emacs in text mode

Re:Zee: A modern text editor for the terminal written in Rust by stjohnswarts on Wednesday March 30, 2022 @11:14AM (#30856298)
I think a lot of these new text editors would be well served by making it easy to set emacs/vi/windows keyboard shortcuts if they're trying to reach a wider audience. Once their value is established then the people using them would be more likely to move to the native keyboard shortcuts. I'm talking about switch a flag like "shortcut_keys_config=vim" not setting a hundred shortcuts manually :)
Re:Zee: A modern text editor for the terminal written in Rust by tcmart14 on Thursday March 31, 2022 @01:29PM (#30869949)
Even though I am a fan of emacs keybindings, a really good example of this is when launching spacemacs for the first time where it prompts the user if they want Evil mode (vi keybindings) or Holy mode (emacs keybindings).
Re:Zee: A modern text editor for the terminal written in Rust by svnpenn on Wednesday March 30, 2022 @12:56AM (#30851623)
Just look at the readme. It says 100 FPS. Vim isn't even close to that, and Vim sucks with large files.
Re:Zee: A modern text editor for the terminal written in Rust by akho on Wednesday March 30, 2022 @03:54AM (#30852483)
The only benchmark I could find is https://pavelfatin.com/typing-with-pleasure/#editor-benchmar... , showing GVim to be quite a bit better than that. For terminal Vim, terminal latency dominates.
Re:Zee: A modern text editor for the terminal written in Rust by svnpenn on Wednesday March 30, 2022 @07:08AM (#30853595)
That page doesn't list FPS at all.
Re:Zee: A modern text editor for the terminal written in Rust by akho on Wednesday March 30, 2022 @07:53AM (#30853903)
What do you think FPS means in the context of a terminal text editor? The linked page is pretty clear in what the author means: “Cursor movement and edits render under 10ms”. So FPS = 1 / latency. The link I gave measures latency; < 10ms is > 100 FPS.

(Though I doubt the statement re: Zee < 10ms latency in practical terms. I think only xterm and Terminal.app are consistently below that in terms of pure terminal latency)

Re:Zee: A modern text editor for the terminal written in Rust by svnpenn on Wednesday March 30, 2022 @11:15AM (#30856317)
I said FPS, I didn't say latency. Please stop trying to argue against a point I'm not even making.
Re:Zee: A modern text editor for the terminal written in Rust by dmd on Wednesday March 30, 2022 @09:52AM (#30855231)
Fortunately, I don't type 100 characters per second.
Re:Zee: A modern text editor for the terminal written in Rust by svnpenn on Wednesday March 30, 2022 @12:42PM (#30857614)
Noob