Live data from Hacker News

Show HN: Fresh – A new terminal editor built in Rust

sinelaw.github.io

81–90 of 158 posts

Re: Show HN: Fresh – A new terminal editor built in Rust

#81

I'm a little annoyed that for a Rust based tool the recommended installation command is to use npm. Why? Is Cargo not good enough? Cargo seems exceptionally well to me.

I get the frustration, but I think the npm option actually makes sense here. A lot of users who’d benefit from a fast Rust tool aren’t Rust developers and won’t have Cargo installed. Shipping it through npm lowers the barrier while still giving everyone the performance benefits. It’s not a knock on Cargo, just a way to make the tool more accessible.

but you could also say a lot of users are web developers and won't have npm installed

Re: Show HN: Fresh – A new terminal editor built in Rust

#82
post #78

Dear Santa, this year I don’t need gadgets - all I want is a Borland Turbo Vision–style console text editor with windows, tabs, and syntax highlighting. I promise to be good and keep my code compiling.

Something like this? https://github.com/magiblot/turbo

Re: Show HN: Fresh – A new terminal editor built in Rust

#83
Good keybindings, some are missing compared to what normally works, e.g., in the browser text input area or in gnome-text-editor (Ctrl-Shift-Up/Down was one I directly ran into).

I've found https://github.com/gphalkes/tilde to work quite well, it also supports the system clipboard. Nice to see a Rust alternative.

Re: Show HN: Fresh – A new terminal editor built in Rust

#84

Earlier quoted context omitted.

I did it because not everybody has cargo installed. I'm using cargo-dist to create this npm package.

I've been wanting a generic package manager for a while that is cross-platform. I wonder how one could find funding for such a project. Thinking about users from various OS' installing tools and software from your niche package manager, yeah that bad boy is going to grind to a halt if you have no key funding.

> generic package manager for a while that is cross-platform

That would be Nix. Runs on any Linux distro and OSX. Also particularly useful for NixOS and NixBSD.

https://nixos.org/download/

Re: Show HN: Fresh – A new terminal editor built in Rust

#86
Great work, my only nitpick is that when you quit, it tells you that its not gonna save, then its yes to confirm quit. I instinctively wanna type N to quit without saving.

I feel like thats the opposite behavior. For example, I use https://github.com/zyedidia/micro as my main editor in terminal, where it says `Save changes to filename before closing? (y,n,esc)”` when you try to quit.

Re: Show HN: Fresh – A new terminal editor built in Rust

#87

I'm a little annoyed that for a Rust based tool the recommended installation command is to use npm. Why? Is Cargo not good enough? Cargo seems exceptionally well to me.

I did it because not everybody has cargo installed. I'm using cargo-dist to create this npm package.

i don’t (and won’t) have npm installed. i do have cargo.

strange thinking!

Re: Show HN: Fresh – A new terminal editor built in Rust

#88
You should put standard keyboard bindings as a pitch on the website as well. Most people in the market for a terminal editor are probably looking for something that doesn't require them to learn a set of keyboard shortcuts that's entirely different from every other piece of software that they use.

I searched for that desperately until I discovered micro[1].

Here's a quick comparison between micro and fresh:

- Fresh implements more standard keyboard shortcuts, like Ctrl+ArrowLeft and Ctrl+ArrowRight to skip to the next and previous word, Ctrl+Backspace to delete the previous word and Ctrl+Delete to delete the next one.

- Fresh is extensible in typescript, Micro in lua.

- Fresh is able to open the wikidata json dump (1.7T).

- Micro is included in most repos, so if you rent a new VPS you can immidiately dnf install it.

[1]: https://micro-editor.github.io/

Re: Show HN: Fresh – A new terminal editor built in Rust

#89
Just installed on both pop_os and windows 11. On Linux everything seems to work ok. On Windows 11 the mouse only moves to the start of a line, cannot select text at all click anywhere but the very first part of a line. Every now and then it will select some random word on the line but mostly just column 1. Installed with Cargo if that matters using rustc 1.91.1, looks like 1.88.0 is min supported. On pop the mouse works as expected. Will check it out more when I get time just wanted to give you the heads up.

Re: Show HN: Fresh – A new terminal editor built in Rust

#90
post #20

Earlier quoted context omitted.

Thing is… who is regularly running `npm update` or `cargo update` to keep local software up to date? I wouldn’t, because I might be in a repo and it starts upgrading all my local dependencies, and I’m not gonna add a text editor as a dev dependency. I’ll happily take the binary, or a tar.gz with the binary in it, though. (Btw I love how it’s following the old DOS aesthetic)

The npm distribution here is just the binary, you run npm install again and it upgrades to the latest binary. That's convenient

I'm in the same boat as a JS/TS developer for years to get used to npm install the recent AI command line tools under global scope, it's really weired. Personally I don't event install front end toolchains global as almost all of them work under project scope.

But I totally get the idea behind this, it's greatly combined with the cargo toolchain and is widely installed than cargo (which by the way npm is much easier to install than cargo with my personal experience), npm handles update nicely, and it can handle multiple arch too. I would still prefer npm install because I have installed a lot recently so it's ok.

Post reply on HN