ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

News and Reviews > Mini-Reviews by Members

Mini review: The Acme editor on Debian on Windows

<< < (2/2)

Akertyna:
I have been using Acme for a while without using any scripts to help my workflow. I'm trying to incorporate a script that simply indents a selection of lines. I do not know why, but none of the scripts are working. I've tried several that I found on github or inside some apps on apknite including the relatively common a+ and a- scripts. I added them to a folder in my path, trying both rc and bash, chmod +x'ed them, and they do not work. The script below echos out properly in the +ERROR window, removes a line with the selected text yet does not replace and indent it. Have I missed a setup step somewhere? Any help you could provide would be great.

--- ---9indent.sh:

#!/usr/bin/env bash

#9indent

echo "WinId is: " $winid

echo -n "1,$" | 9p write acme/$winid/addr

echo "Selected whole contents for overwriting with 'write'"

9p read acme/$winid/body | indent -st | 9p write acme/$winid/data

Tuxman:
I have just tried it: It works for me.


* Make sure indent is actually installed and available for your user (because else it will obviously fail).
* chmod -x /home/youruser/9indent.sh
* Add it to your toolbar and middle-click it.
Before:

Mini review: The Acme editor on Debian on Windows

After:

Mini review: The Acme editor on Debian on Windows

Does indent -st work in a "Win" window?

edit: My screenshots are made with acme2k because that's what I happen to have on this machine, but it should not matter that much.

Tuxman:
Heads up: plan9port's Acme supports file names with spaces now.
https://github.com/9fans/plan9port/commit/7b1c85f6e8031a50e8e6f5977d12bea820e921ca

Navigation

[0] Message Index

[*] Previous page

Go to full version