9fans archive / 2009 / 08 / 571 prev next
From: yy <yiyu.jgl@gma...>
Subject: Using Guide Files
Date: Fri, 14 Aug 2009 19:57:30 +0200
2009/8/12 <6o205zd02@sne...>:
> Given how useful and important it is to have Edit in the tag of text
> windows, is there some reason that it isn't there automatically?
After this discussion, I wrote a little patch, which somebody else
might find useful:
; diff /sys/src/cmd/acme/exec.c src/acme/exec.c
70a71
> { L"|", edit, FALSE, XXX, XXX },
149c150,152
< e = lookup(r, q1-q0);
---
> e = nil;
> if(runestrncmp(r, L"|", 1) != 0 || q1-q0 == 1)
> e = lookup(r, q1-q0);
What it does is to interpret the pipe symbol '|' like the Edit command
when that is the only selection. That way, you can make the 2-1 chord
with Edit commands in every text window. I know it is a bit too
obscure, but very convenient, since the symbol is *always* in the
window - around the middle of the tag bar surrounded by spaces - and
it does not have any other use (you won't be using it to name
executable files). Maybe somebody else wants to give it a try.
--
- yiyus || JGL . 4l77.com