If any sam users are interested in this sort of convenience,
please see this addition of an M command to add to b2 menu:

http://runjimmyrunrunyoufuckerrun.com/src/patch/sammenu.diff

been in 9front a while:

https://git.9front.org/plan9front/9front/712dfd75cd130479ebeffdba87ce272d21fae764/commit.html

Here is a simple example usage (requires ^ cmd, which I believe also a 9front 
innovation):

; chmod +x samstart
; cat samstart
#!/bin/cat
!fn indent{echo 'x/^/i/ /'}
!fn unindent{echo 'x/^  /d'}
M^indent
M^unindent

Start sam, run ^samstart; now you have indent and unindent options in the
b2 mouse menu. From there you can go as crazy as you like...
http://runjimmyrunrunyoufuckerrun.com/rc/s has some ideas, including
rudimentary attempts at (un)commenting and other stuff which tbh I do not
use very often... Very handy, however, is the facility this provides for 
triggering
a one-click write/compile/run/jump-to-error cycle: see
http://runjimmyrunrunyoufuckerrun.com/rc/6 and /rc/6build for the idea.

Only thing could be a little bit nicer would be a flag or read stdin to
automatically ingest setup commands like these when sam starts.

umbraticus

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td1c9bb890f22e833-Md40fd32d24715f4876f1a965
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to