- Subject: Re: [Jed-users-l] Help: A few config questions.
- From: Daniel Carrera <dcarrera@xxxxxxxxx>
- Date: Sun, 26 Dec 2010 18:38:24 +0100
Hi Tom,
On Sun, Dec 26, 2010 at 5:13 PM, Tom Culliton <culliton@xxxxxx> wrote:
> I'm pretty sure you can't get rid of it. If you kill '*scratch*' or rename
> it a new one is created. My programming instincts say that it is there to
> keep the number of buffers == 0 and current buffer == NONE type
> complications from making life miserable. It and the command/entry
> mini-buffer are pretty deeply woven into fabric of Jed.
Thanks. After some Googling I found an interesting alternative. You
can write an S-Lang macro that purposely ignores all the *foo*
buffers. As a final touch, the macro can take you forward and back
through the list of buffers. So now on my JED, I can type Ctrl-N or
Ctrl-P to go to the next or previous buffer ignoring *scratch*,
*Completions* and friends.
%
% Switch to previous or next buffer.
% Source: http://www.rexx.com/~dkuhlman/jed_macros.html
%
define next_buffer (previous) {
variable n, buf;
n = buffer_list (); % Get the buffers on the stack.
if (previous) {
_stk_reverse (n-1);
}
loop (n) {
buf = ();
n--;
% Skip *scratch* and other buffers that are not of interest.
if ((buf[0] == '*') or (buf[0] == ' ')) {
continue;
}
sw2buf (buf);
_pop_n (n);
return;
}
}
setkey ("next_buffer (0)", "^N"); % Ctrl-N => Next buffer.
setkey ("next_buffer (1)", "^P"); % Ctrl-P => Prev buffer.
I have to say, JED is a pretty nifty program. It's the only editor I
know that has a low barrier to entry, and still has powerful features
like the S-Lang macros.
Daniel.
--
No trees were destroyed in the generation of this email, but a large
number of electrons were severely inconvenienced.
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l
[2010 date index]
[2010 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]