- Subject: Re: Line numbers and Visible Tabs
- From: Morten Bo Johansen <mojo@xxxxxxxx>
- Date: Sun, 15 Jun 2003 18:32:05 +0200
Robert Lillack <rob@xxxxxxxxxx> wrote:
RL> I have two small feature requests and would like to
RL> discuss them/ask about the possibility to add them:
RL> 2. Visible Tabs.
RL> I often need to edit files normally managed by other
RL> people and then it's hard to see if there are "real" tabs
RL> inside --> so I destruct the "layout" of code not written
RL> by me. If I could "see" the tabs I could insert real tabs
RL> and everything would be fine.
RL> I'd love to see something like:
||--> text|-->text
||--> |--> text
RL> with "|-->" drawn in a user defined color. Maybe it
RL> would even be possible to make the shown string user
RL> definable.
I am attaching tabcolor.sl that was posted to the list a while
back (I forget by whom). If you load this you can just do
M-x tabcolor to toggle coloring of tabs on and off.
Morten
--
"It usually takes me more than three weeks to prepare a good impromptu
speech." (Mark Twain)
%-*- mode: slang; mode: fold; -*-
% tabcolor: a function to colorize tabs and spaces
% usage e.g.
% autoload( "tabcolor", "tabcolor.sl");
% add_completion( "tabcolor");
% M-x tabcolor colorize tabs and spaces
% M-x tabcolor restore state before
% ks 2002-11-27T22:44:02
static variable m= "TABCOLOR"; % %{{{
create_syntax_table(m);
define_syntax( "\d009", '+',m); % operators
define_syntax( "\d032", '0',m); % numbers
%}}}
static define set_color_( o, c) % %{{{
{
variable f, b;
(f,b)= get_color( c);
set_color( o, f, b);
}
%}}}
public define tabcolor() % %{{{
{
variable i, s= NULL;
if ( i= blocal_var_exists( m), i)
s= get_blocal_var( m);
else
create_blocal_var( m);
if ( s == NULL)
{
s= what_syntax_table(); % returns always "DEFAULT" ?
(s,)= what_mode(); s= strup( s);
use_syntax_table( m);
set_color_( "number", "string");
set_color_( "operator", "comment");
set_blocal_var( s, m);
}
else
{
use_syntax_table( s);
()= evalfile( _Jed_Color_Scheme);
set_blocal_var( NULL, m);
}
}
%}}}
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]