top | item 41940032

(no title)

OmarAssadi | 1 year ago

While looking into Acme several months back, I actually bumped into this; there just don't seem to be many editors that draw inspiration from Acme's workflow rather than borrowing from things like Vim, Emacs, or more traditional mouse-based GUI editors -- e.g., Notepad++, Sublime, Kate, VS Code, etc -- so Anvil popped up pretty much instantly while searching around for similar concepts.

However, as someone who hadn't, and unfortunately, still hasn't, spent a load of time using Acme, it wasn't super clear to me how they differentiate from each other. I wasn't totally sure whether it was more of a clone made for fun of it, or whether Anvil was trying to solve a genuine issue that Acme wasn't, or was trying to solve in its own distinct way, or perhaps trying to address a gripe with Acme itself, etc.

If anyone working on the project could highlight some of the differences in features and goals, or if anyone who has used one or the other long enough to notice some stuff at a glance, it'd be super helpful as an outsider to both. Superficially, I do see syntax highlighting, but I figure there's probably more going on than that.

Also, is there any sort of publicly accessible version control? I see the source archives, but I couldn't find any sort of mention of git or any other vcs.

FWIW, by the way, I hope asking about a comparison doesn't come across as some sort of dismissive, "what's the point", comment; it was just cool and interesting enough that this isn't the first time I've wanted to ask.

discuss

order

ksjw12|1 year ago

A few of the main differences between Acme and Anvil are:

1. Anvil supports syntax highlighting, as you noted.

2. Anvil allows remote editing over ssh. If you open a file with a name of the form '[username@]host:/path/to/file', then Anvil will establish an SSH connection to the host (if one doesn't already exist) and allow the user to edit the file and execute commands remotely in the context of the window

3. Anvil allows the use of multiple cursors and selections. What's interesting about this is that text manipulation language called "Range Statements" in Anvil uses the current selections in the window as input (the initial ranges on which to operate), and those statements that produce a set of ranges when executed replace the set of selections in the window. Range Statements are mostly equivalent to the Sam language in Acme, which most people refer to as Structural Regular Expressions (but of which Structural Regular Expressions are only a subset of the language). So the practice of selecting text with the mouse or the keyboard, adjusting ranges with expressions, and switching between the two is slightly more tactile than in Acme.

4. Anvil is a bit more convenient to use with the keyboard than Acme. For example, moving up and down with the arrow keys is standard, text can be selected using shift and movement keys, a word can be executed using CTRL-T, and a line by CTRL-Enter, and a number of other common keyboard shortcuts are supported.

5. Anvil has better support for files with spaces in the name

6. Anvil has a special syntax that makes it a bit easier to execute commands or perform searches that contain spaces. If you surround the command or search with lozenges (i.e. ◊|wc -l◊ or ◊search term◊) then executing or searching using the mouse by clicking anywhere within the lozenges executes or searches for the entire delimited string. This is nice for things you do often.

7. Anvil allows searching backwards via clicking, as well as searching for a regexp

8. Anvil borrows from Wily the ability to hit Escape to highlight the recently typed text for easy execution or searching

hollerith|1 year ago

>whether Anvil was trying to solve a genuine issue that Acme wasn't

The last time I checked Acme used its own text-rendering algorithms and its own fonts (this is the Acme that is part of plan9port) which wouldn't be a problem except that the visual details (I am pretty sure Acme was using bitmapped fonts) clashed pretty strongly with the rest of the system (I was using a Mac at the time).

The browsers do their own text rendering, too, but the rendering is tuned to match the OS the browser is running on.

Point is, although I could've gotten used to the tiny details of how Acme renders text, I despaired of ever getting used to frequently switching my gaze back and forth between Acme's window and the other windows on the Mac.

In contrast, the text in the Anvil window does not clash with all the other windows on my system (which is no longer a Mac, but rather Gnome / Linux). So that is why I rejected Acme quickly after installing it, but am still interested in Anvil (the existence of which I learned about about an hour ago).