Live data from Hacker News

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

sinelaw.github.io

91–100 of 158 posts

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

#91

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 wo…

If you use WSL in Windows it works fine (or so I've heard). Getting it to work properly on native Windows is a gap. I tried various quick fixes like using a different backend but they didn't help much.

Thanks for reporting!

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

#92
post #85

1. CI looks unhealthy: https://github.com/sinelaw/fresh/actions/workflows/ci.yml 2. Thank you for running builds on ubuntu 22.04 so it's compatible with it. You might want to compile with cross or zig to support even older operating systems.

As it's statically linked I don't see a reason it shouldn't work in any much older Linux as well. But I haven't tried yet.

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

#93

Earlier quoted context omitted.

Sublime, Atom, VSCode, and now Zed are all GUI-based. That's not bad - but I prefer the terminal (and I find tmux + ssh very convenient). I guess it's a matter of personal taste. For terminal based, there are also many options but not so much in the direction of "VSCode style". They're mostly focused on being "vi-style". And also the huge file support isn't as good in any of the others that I've tried.

Vim and Emacs run in the terminal perfectly well.

I'm a big emacs user for many years but the amount of config tweaking and package installation needed (for me) is too much. And I never made it past the elisp learning curve

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

#94
post #87

Earlier quoted context omitted.

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!

I would bet 100 Euro there is at least an order of magnitude, if not two or three, more installs of NPM clients than Cargo right now.

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

#95
post #20

Earlier quoted context omitted.

That (security ) is something I also worry about. I'd like to get off npm if only for this reason. It's a hack to get started. The other thing it gives you is the ability to easily upgrade and uninstall so just a script to copy stuff is not on par.

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)

> who is regularly running `npm update` or `cargo update` to keep local software up to date?

I do, religiously, as part of my routine to check for updates.

  n lts && npm uninstall -g corepack && npm update -g && n prune
Sometimes things break (that's how `npm uninstall -g corepack` became a part of my one-liner), but it is easier to update often than to neglect updates for years.

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

#96
post #87

Earlier quoted context omitted.

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!

Then use: cargo install fresh-editor

I've documented that as well it just isn't the first option listed

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

#97
post #32

Earlier quoted context omitted.

Is it 400mb? Could be V8 for plugins.

Thanks for reminding me. Unfortunately yes, it's because of v8 (for Deno). For extensions, the choice was either TypeScript (and get this bloat) or go with Lua and a much smaller binary (but less popular language). But - I just realized stripping it brings it down to 76MB so I guess that's ok! Will push a commit :)

> For extensions, the choice was either TypeScript (and get this bloat) or go with Lua and a much smaller binary (but less popular language).

Incredible, the technical choice got overridden by popularity, leading straight to bloat

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

#98

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.

npm is certainly not something everyone has.

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

#99
post #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.

Good point, I'll change it to something more sensible with action-based options instead of y/n. https://github.com/sinelaw/fresh/issues/226

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

#100

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.

ctrl+shift+up/down - not sure what you mean it to do?

In VSCode it adds multiple cursors directly above/below.

In other editors I think it moves (shifts) the current line up or down.

Post reply on HN