5 ms·
I use Acme (from Plan9Port) as my every-day editor for work. I run it full-screen on a 4K monitor. I've got a co-worker who likes to grumble about mice, but som
by floren 6y ago
I use Acme (from Plan9Port) as my every-day editor for work. I run it full-screen on a 4K monitor. I've got a co-worker who likes to grumble about mice, but somehow when we're debugging something on a call, I'm always in the appropriate file at the appropriate line number long before he is :) There are some tools (acmego [9fans.net/go/acme/acmego], A [github.com/davidrjenni/A]) that make working with Go a lot more pleasant, too.
I've been using Acme for about 15 years now, though. I dimly remember deep frustration when I was still learning it, but now that I'm used to it it's great.
Here's a screenshot that shows my typical work layout, although it's a little "manufactured" to avoid including any proprietary code from work: https://i.imgur.com/Trg79NS.png https://i.imgur.com/Trg79NS.png
- haolez 6y agoI've been willing to try it for a while, now. Does the lack of "native" support for real-time linting, debuggers, formatters, etc get in your way? Did you manage to integrate such features in your workflow?
- floren 6y agoGo tooling actually works surprisingly well in Acme, because the tools tend to print out files with line numbers for errors, then when you click on that line number Acme will take you directly to the line in question. Here's a sample workflow: I'm hacking on some code in /home/john/foo. I have a directory window open in /home/john/foo, plus the files foo.go and foo_test.go open. I make some changes in foo.go, then in the directory window I type `go test`, select it with the mouse, and middle-click. This runs `go test`, creating an "Errors" output frame in the rightmost column. If the tests pass, this frame just says "PASS". If the tests fail, it'll say something like `./foo.go:27:10: undefined: xyz`. I right-click on `./foo.go:27:10` and Acme immediately takes me to that like in the appropriate file. I make a change, execute "Put", and then middle-click `go test` again to try the tests once more. The delve debugger also prints line numbers that work with Acme. I run delve in an Acme terminal, and when I e.g. print a backtrace, I can simply right-click any of the line numbers to jump immediately to that code (Acme will open the file in question if it's not already open). acmego will run gofmt and automatically add/remove imports as necessary every time you save the file, which is a huge convenience. There's no syntax highlighting, which is a huge dealbreaker for some people. Personally, I find it distracting to watch huge swathes of my file change colors because I typed ", then change back as soon as I close with another ", so the lack of highlighting is great for me. Edit: in my sample workflow above, I mentioned typing `go test` right in the directory window, but that's just ephemeral... you'll lose the commands if you refresh the file list, etc. A more permanent thing is to drop useful commands into a "guide" file in that directory; that way you can keep a whole suite of commands to run tests, run benchmarks, build & deploy, etc. right at your fingertips. Edit 2: There's also a number of Language Server Protocol clients for Acme (see https://news.ycombinator.com/item?id=23782439 https://news.ycombinator.com/item?id=23782439 and https://github.com/fhs/acme-lsp https://github.com/fhs/acme-lsp) but I don't use them... I'm old-fashioned.
- somezero 6y agoOne of the main argument for Acme was that keyboard navigation is tends to be one dimensional, whereas navigating with mouse is two dimensional. I find it curious that a higher-than-one dimensional representation of a program is not present: proper syntax highlighting makes debugging much faster. Say, I want to see some expression with deeply nested parenthesis (lisp-style, or nested function calling in Python) is matching. I can do that with my eyes, checking the color of the beginning and the ending parenthesis. Same goes for, say, if I want to find a string in my program. I don't have to care about the quotation mark, I can just look at its color being different from the rest. Executing commands with the mouse is heavily underrated and is a behavior I fail to faithfully replicate in i3 - or even Emacs, for that matter - but only if you guys had syntax highlighting...
- floren 6y agoI consider the lack of highlighting part of a "calm" interface: the only thing that changes as I type, are the characters that I type. But maybe that's just Stockholm Syndrome after 15 years of Acme! :) When I need to check nesting levels, I use a little acme-trick: double-click on the closing mark (works for parentheses, curly brackets, quotes, probably more) and it'll highlight everything contained within that level. So if I type (some (big (lisp (expression)))) and want to make sure I got the right number of parentheses at the end, I just double-click on the last one and make sure the whole expression gets highlighted. Here's a screenshot: https://i.imgur.com/Qyvv2K9.png https://i.imgur.com/Qyvv2K9.png I don't find I need to do it particularly often when writing Go, though, and if I do... well, I start to think about refactoring to make my function invocation less obtuse, or whatever.
- somezero 6y agoInteresting! But you see all of the benefits of syntax highlighting and real-time linting is about being steered towards a working code in a gradual and unmotivated way, prior to actually intending to check whether the code works... Although I'm not sure how critical this really is. My personal argument for them might really `only` be habit.
- bch 6y ago> but somehow when we're debugging something on a call, I'm always in the appropriate file at the appropriate line number long before he is :) I’d enjoy seeing these parallel workflows happening, and seeing where Acme is a better <xyz>, or where it punts and has a completely different paradigm, besting your coworker (and vice versa).
- floren 6y agoAnother thing I forgot to mention: Acme can be controlled programmatically, and there are Go bindings, so I wrote my own little mpd client to play music while I worked. You can see it at the bottom of the leftmost column in the screenshot... looks like Blue Oyster Cult was playing when I took the shot. It wasn't a lot of code (https://github.com/floren/Ampd https://github.com/floren/Ampd)
- noobermin 6y agoPerhaps this might sound like a noobish question but I found the video super cool. That said, does acme has syntax highlighting? I think with that I'd be willing to learn it.
- haolez 6y agoNo.