3 ms·
This inspired me to have a try at running Edit on macOS via Docker - here's what I got working (should work for anyone else with Docker installed on Apple silic
by simonw 1y ago
This inspired me to have a try at running Edit on macOS via Docker - here's what I got working (should work for anyone else with Docker installed on Apple silicon too, I pushed the image to the GitHub Container Registry):
docker run --platform linux/arm64 \
-it --rm \
-v $(pwd):/workspace \
ghcr.io/simonw/alpine-edit
Run that in a directory to open Edit against the files in that directory.
More notes here: https://simonwillison.net/2025/Jun/21/edit-is-now-open-source/ https://simonwillison.net/2025/Jun/21/edit-is-now-open-sourc... - and a new TIL on publishing to the GitHub Container Registry here: https://til.simonwillison.net/github/container-registry https://til.simonwillison.net/github/container-registry
You can also compile directly from source on macOS - instructions here, I've not tried this yet: https://github.com/microsoft/edit/blob/main/README.md#build-instructions https://github.com/microsoft/edit/blob/main/README.md#build-...
- kinduff 1y agoI built it for macOS natively and it works like a charm!
- rfl890 1y agoJust wondering, why did you make an entire container image instead of trying to compile it from source first?
- VikingCoder 1y agoBecause now I can use their Docker image trivially. They can also trivially use their Docker container on multiple computers, multiple VMs, multiple VPSs. They can Docker Compose it into other Docker images they're setting up, too. I'm definitely not a Docker expert, but I've become a huge fan.
- simonw 1y agoMainly because I wanted an excuse to figure out how to package tools like this using Docker. It also felt like a better way to distribute the tool for other people to use: I don't want to distribute a compiled binary (because in macOS you then need to sign it for other people to use it), but a Docker incantation skips that step.
- None4U 1y agoFor Apple's own `container`[1], just remove the `--platform linux/arm64` part, like this: container run -it --rm -v "$(pwd):/workspace" ghcr.io/simonw/alpine-edit I did have to resize my terminal for this to work, but that could be a terminal emulator issue. [1] https://github.com/apple/container https://github.com/apple/container
- commandersaki 1y agoThis was harder to quit than vim. ctrl-f didn't work and there's no alt on my keyboard; hard pass.
- da_chicken 1y agoI don't understand. You don't have an option key, either? Or are you not on a Mac, PC, or Chromebook?
- commandersaki 1y agoOn a macbook pro, option key just gave me a ƒ symbol, both in Terminal.app and Ghostty. Anyways, if that was meant to be alt and it requires setup to work, then it's not worth the effort.
- Aaron2222 1y agoTerminal.app has a setting "Use Option as Meta Key" that needs to be enabled. It's under the Edit menu as well as in Settings > Profiles > Keyboard (if you want, you can click use Command-A to select all the profiles to apply the change to all of them at once). Ghostty will have a similar option. Also surprised you haven't encountered this earlier, given it affects all usage of Alt in the terminal.
- commandersaki 1y agoNever had a reason to use alt or F-keys; I deliberately avoid them because they're not easily accessible by all terminals. Only programs I've seen these days use it are emacs and this edit program.