* [9fans] Acme and cscope shortcuts
@ 2005-07-16 9:38 Mike Casinghino
2005-07-16 10:18 ` Charles Forsyth
2005-07-16 12:48 ` Russ Cox
0 siblings, 2 replies; 6+ messages in thread
From: Mike Casinghino @ 2005-07-16 9:38 UTC (permalink / raw)
To: 9fans
I'm switching to the acme environment on linux (from vim/xterm) using
plan9port. For cscope, I created a script called ~/bin/fgdef
(find-global-def):
echo 1$1 | cscope -l -d | \
perl -ne 'print "$1:$3 $2 $4\n" if m/(\S+)\s+(\S+)\s+(\d+)\s+(\S+)\s+(.*)/;'
Now I can put "fgdef symbol" in my tagline, middle sweep it and cscope
finds the definitions for me. The perl noise rearranges the output for
button-3 clicking.
I was thinking of adding some keyboard + mouse-button shortcuts into
acme, and was wondering if anyone has suggested this or actually tried
it before. Here's a short list of what I'd like to do.
* In a text window, holding down Alt and clicking button-3 would
reverse search for the selected text.
* Holding Alt and clicking button-2 in the tagline would run the
tagline command with the selection as an argument. (That would work
*great* with the cscope trick above.)
* Holding Ctrl and clicking button-2 in the tagline would clear the
output window before running the command.
* A Lineno tag keyword that displays line numbers in a text window.
* Oh, and mail so I can finally ditch mutt
Any suggestions, admonitions or warnings?
-Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Acme and cscope shortcuts
2005-07-16 9:38 [9fans] Acme and cscope shortcuts Mike Casinghino
@ 2005-07-16 10:18 ` Charles Forsyth
2005-07-16 12:48 ` Russ Cox
1 sibling, 0 replies; 6+ messages in thread
From: Charles Forsyth @ 2005-07-16 10:18 UTC (permalink / raw)
To: mike.casinghino, 9fans
>>* Holding Alt and clicking button-2 in the tagline would run the
>>tagline command with the selection as an argument. (That would work
>>*great* with the cscope trick above.)
Chords of mouse buttons
...
Commands may be given extra arguments by a mouse chord with
buttons 2 and 1. While holding down button 2 on text to be
executed as a command, clicking button 1 appends the text
last pointed to by button 1 as a distinct final argument.
For example, to search for literal text one may execute Look
text with button 2 or instead point at text with button 1 in
any window, release button 1, then execute Look, clicking
button 1 while 2 is held down.
When an external command (e.g. echo(1)) is executed this
way, the extra argument is passed as expected and an envi-
ronment variable $acmeaddr is created that holds, in the
form interpreted by button 3, the fully-qualified address of
the extra argument.
in short, 2-1 chord executes the command with the selection as argument
>>* Oh, and mail so I can finally ditch mutt
/acme/mail/guide
/acme/mail/readme
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Acme and cscope shortcuts
2005-07-16 9:38 [9fans] Acme and cscope shortcuts Mike Casinghino
2005-07-16 10:18 ` Charles Forsyth
@ 2005-07-16 12:48 ` Russ Cox
[not found] ` <2309aa1805071611221ec2b908@mail.gmail.com>
2005-07-16 19:00 ` Charles Forsyth
1 sibling, 2 replies; 6+ messages in thread
From: Russ Cox @ 2005-07-16 12:48 UTC (permalink / raw)
To: Mike Casinghino, Fans of the OS Plan 9 from Bell Labs
> I was thinking of adding some keyboard + mouse-button shortcuts into
> acme, and was wondering if anyone has suggested this or actually tried
> it before. Here's a short list of what I'd like to do.
Plan 9 keeps the keyboard and mouse separate. They're different
input devices and are treated as such. Also, Alt is taken for compose
sequences (so typing Alt, *, a gets you a unicode alpha).
> * In a text window, holding down Alt and clicking button-3 would
> reverse search for the selected text.
I sometimes do wish there was an easier reverse search, but
:-/text will get the job done.
> * Holding Alt and clicking button-2 in the tagline would run the
> tagline command with the selection as an argument. (That would work
> *great* with the cscope trick above.)
As Charles pointed out, a chord exists already for this.
> * Holding Ctrl and clicking button-2 in the tagline would clear the
> output window before running the command.
This seems of dubious value. I just Del the output window
(I assume you mean the dir/+Errors window) when I want it cleared.
> * A Lineno tag keyword that displays line numbers in a text window.
You mean like vi's :set number? That'd be hard to implement.
You can get to a particular line with :123 in the tag and you can
find out where you are with Edit =.
> * Oh, and mail so I can finally ditch mutt
Please please please. Work on this. Plan 9 has a really nice mail
system that you won't be able to duplicate easily on Unix but at
the least we could get a simple acme mail (maybe based on mh)
going. There is a framework for writing acme clients in
src/cmd/netfiles/acme.[ch].
Russ
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <2309aa1805071611221ec2b908@mail.gmail.com>]
* Fwd: [9fans] Acme and cscope shortcuts
[not found] ` <2309aa1805071611221ec2b908@mail.gmail.com>
@ 2005-07-16 18:24 ` Mike Casinghino
2005-07-16 18:45 ` Steve Simon
0 siblings, 1 reply; 6+ messages in thread
From: Mike Casinghino @ 2005-07-16 18:24 UTC (permalink / raw)
To: 9fans
On 7/16/05, Russ Cox <russcox@gmail.com> wrote:
> > * Holding Alt and clicking button-2 in the tagline would run the
> > tagline command with the selection as an argument. (That would work
> > *great* with the cscope trick above.)
>
> As Charles pointed out, a chord exists already for this.
That's great, I totally missed that in the manual.
> > * Holding Ctrl and clicking button-2 in the tagline would clear the
> > output window before running the command.
>
> This seems of dubious value. I just Del the output window
> (I assume you mean the dir/+Errors window) when I want it cleared.
That's how I'd been doing this. I would still like to avoid running my
mouse all the way down to the output window, but it works for now.
> > * A Lineno tag keyword that displays line numbers in a text window.
>
> You mean like vi's :set number? That'd be hard to implement.
> You can get to a particular line with :123 in the tag and you can
> find out where you are with Edit =.
Another neat trick. Looks like I need to study the sam manual.
> > * Oh, and mail so I can finally ditch mutt
>
> Please please please. Work on this. Plan 9 has a really nice mail
> system that you won't be able to duplicate easily on Unix but at
> the least we could get a simple acme mail (maybe based on mh)
> going. There is a framework for writing acme clients in
> src/cmd/netfiles/acme.[ch].
I'll get cracking.
Thanks for all the pointers, everyone.
-Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Acme and cscope shortcuts
2005-07-16 12:48 ` Russ Cox
[not found] ` <2309aa1805071611221ec2b908@mail.gmail.com>
@ 2005-07-16 19:00 ` Charles Forsyth
1 sibling, 0 replies; 6+ messages in thread
From: Charles Forsyth @ 2005-07-16 19:00 UTC (permalink / raw)
To: 9fans
> Please please please. Work on this. Plan 9 has a really nice mail
> system that you won't be able to duplicate easily on Unix but at
> the least we could get a simple acme mail (maybe based on mh)
i see now. sorry, my suggestion of /acme/mail/guide was made in a rather
mystified way -- i'd assumed it had just been overlooked -- but actually
i'd overlooked that this had to do with plan9ports on unix not plan9.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-07-16 19:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-16 9:38 [9fans] Acme and cscope shortcuts Mike Casinghino
2005-07-16 10:18 ` Charles Forsyth
2005-07-16 12:48 ` Russ Cox
[not found] ` <2309aa1805071611221ec2b908@mail.gmail.com>
2005-07-16 18:24 ` Fwd: " Mike Casinghino
2005-07-16 18:45 ` Steve Simon
2005-07-16 19:00 ` Charles Forsyth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).