Plan9/Acme
My random collection of acme commands…
Select, Search, Format
:, :0 :$ (Edit =) (Edit ,d) … all, begin, end, cur, del
(:/) (:-/) (:+/) (|fmt) … search (back|fwd), fmt
(Edit |tr a-z A-Z) (Edit |tr A-Z a-z) … (lower|upper) case
(Edit s/^/ /g) (Edit s/^( | )//g) … (un)indent
(Edit s/^/> /g) (Edit s/^> //g) … (un)quote
Files
Print all modified files:
Edit X/'/
Print all files:
Edit X/.*/
Save all modified files:
Edit X/'/ w
Find with Context
Find regexp
in window:
Edit ,x/.*\n/ g/regexp/ {
=
-1,+1 p
}
Find regexp
across all windows:
Edit X/^[^\+].+/ {
,x/.*\n/ g/regexp/ {
=
-1,+1 p
}
}
Replace
Replace all occurrences of regexp
with replacement
in current selection
:
Edit s/regexp/replacement/g
Replace all occurrences of regexp
with replacement
in current window
:
Edit ,s/regexp/replacement/g
Replace all occurrences of regexp
with replacement
in all windows
:
Edit X/^[^\+].+/ {
,x/.*\n/ {
s/regexp/replacement/g
}
}