File: jed.rc

package info (click to toggle)
jed 0.98.7-14
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,088 kB
  • ctags: 3,851
  • sloc: ansic: 29,315; makefile: 257; sh: 248
file content (334 lines) | stat: -rw-r--r-- 12,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
%   User Initialization file for the JED editor  -*- slang -*-
%   If a user does not have a startup file in the user's home directory,
%   JED will automatically load this from JED_LIBRARY.   Thus is is easier
%   for a system manager to make defaults for all users.

%   Do not edit this file directly.  Instead, copy it to your home 
%   directory (sys$login:jed.rc on VMS or $HOME/.jedrc on Unix) and edit
%   the resulting file.  

%   To uncomment a line, simply remove any leading '%' characters.

%   This file is divided into various sections.  The first section pertains
%   to keybindings (e.g., Wordstar, Emacs, EDT, etc...) and the following
%   sections pertain to user preferences such as default TAB sizes, line 
%   and column numbers on status line, colors, indentation style, etc...

if (BATCH == 0)
{
%----------------------------------------------------------------------
%  Keybindings  (not loaded for batch processes)
%  
%    Default bindings are Emacs-like with EDT emulation on Unix and VMS.
%    For the PC, only Emacs is enabled by default.  If you do not want EDT
%    bindings, simply coment out the appropriate line.   
%
%    For Wordstar like bindings, comment out EDT and Emacs lines and
%    uncomment Wordstar line.  A similar statement applies for BRIEF.
%

   () = evalfile("emacs");           % Emacs-like bindings
%  () = evalfile("edt");             % EDT emulation
%  () = evalfile ("brief");          % Brief Keybindings (MSDOS only!!)
%  () = evalfile("wordstar");        % Wordstar
%  Note: For EDT emulation, jed386.exe requires that the GOLD.COM TSR 
%        be loaded.  This TSR is available from space.mit.edu:/pub/davis/jed.

% What should the Ctrl-H key do??  
%
%  setkey ("bol", "^H");              % causes ^H to go to beg of line (EDT)
%  setkey ("help_prefix", "^H");      % Uncomment to have Ctrl-H as help

% Debian is a Linux system ! <ch@debian.org>
  () = evalfile("linux");

#ifdef XWINDOWS
   % See xjed.txt for information regarding the delete key under X Windows.
   %    x_set_keysym (0xFFFF, 0, "\e[3~");
   %    setkey ("delete_char_cmd", "\e[3~");
#endif
   %  !!!!  ^S/^Q flow control problems !!!!
   %  if you experience problems with JED suddenly going into search 
   %  for some reason then you are a victim of emacs brain dead binding of ^S
   %  to search.  TO prevent this from happening, either find out how to 
   %  prevent unwanted ^S/^Q characters or uncomment the next line:
#ifdef UNIX   
   %enable_flow_control (1);
#endif
   
%----------------------------------------------------------------------
%
%   TAB key setting  -- by default, the tab key is bound to 'indent_line_cmd'.
%                       If you want a real tab inserted, uncomment next line.

setkey("self_insert_cmd", "^I");

%----------------------------------------------------------------------

%  Initial help screen --- comment out to disable.
%  Note that for the help to be valid, it must occur AFTER bindings are 
%  loaded.
   
help();

}  %Batch

%%%%%%%%%%%%%%%% top menu bar %%%%%%%%%%%%%%%

% To disable it, uncomment the next line.
% enable_top_status_line (0);


%----------------------------------------------------------------------
% JED global variables  --- defaults shown
%
#ifdef VMS UNIX
USE_ANSI_COLORS = 1;   % if non-zero, JED will display colors on a color
                        % terminal (Unix and VMS only) See doc/color.txt 
                        % for more discussion and look below for setting
                        % the colors.
#endif
No_Backups = 0;         % If non-zero, backup files will not be created.
Startup_With_File = 1;  % if greater then zero, force JED to prompt for a file
                        %   if none is specified on the command line.  If 
                        %   negative, inhibit startup message.
DISPLAY_TIME    = -1;    % non-zero enables the time to be displayed on 
                        %  status line, zero disables it.  If this value
                        %  is -1, 24 hour time will be used.
HIGHLIGHT	= 1;	% non-zero for region highlighting
WANT_SYNTAX_HIGHLIGHT = 1;
                        % Highlight syntax in C, Fortran, and TeX modes.
                        % See section on colors
                        %  below for choosing how to highlight.  On Unix and 
                        %  VMS systems, USE_ANSI_COLORS must also be non-zero.
HORIZONTAL_PAN	= -1;	% if zero, no automatic panning.  If positive, only
                        % the current line is panned.  If negative, pan window.
#ifdef MSDOS		% For msdos, panning window might be better:
  HORIZONTAL_PAN  = -1;
#endif

#ifdef MSDOS
  LINENUMBERS	= 1;	% A value of zero means do NOT display line number on 
#else                   % status line line.  A value of 1, means to display
  LINENUMBERS	= 2;	% the linenumber. A value greater than 1 will also
#endif			% display column number information.  I recommend a 
			% value of 2 only at high baud rates

BLINK		= 1;	% if non zero, blink matching parenthesis
TAB_DEFAULT	= 8;	% Tab size  (also try edit_tab_stops)
WRAP		= 78;	% wrap column
ADD_NEWLINE	= 1;	% add newline to file when writing if one not present
IGNORE_BEEP	= 3;	% Beep terminal during error messages---
                        %  1 == sound only, 2 = visible bell only, 3 = both
_traceback	= 0;	% Non zero means dump traceback on S-Lang errors
WRAP_INDENTS	= 0;	% Non zero indents next line after wrapping current.
			%  Make this a 1 if you want indented text mode.
CASE_SEARCH	= 0;    % zero turns off case sensitivity for 
                        % search functions, non-zero turns it on
%KILL_LINE_FEATURE = 0;
			% If non-zero, kill line will kill through end of the 
			%  line if Point is at the beginning of the line. For
			%  emacs-like behavior, set this to zero.
REPLACE_PRESERVE_CASE = 1;  % If non-zero, replace operations will attempt to
                            % match the case of the replaced string.
#ifndef MSDOS OS2
OUTPUT_RATE    = 0;     % Should be set automatically by JED. It is the 
                        % of chars sent to terminal / second.  (0 = Infinity)
			% 
			% If JED pauses during screen updates, then you need
			% to set your baud rate properly or simply set this
			% variable to zero.  JED is not slow, rather it assumes
			% your terminal is, so JED sleeps when writing to the
			% terminal.  By default, this is set to zero.  I 
			% suggest that you comment it out and let JED set it 
			% ASSUMING YOUR BAUD RATE IS CORRECT.  For example, on
                        % Unix, enter 'stty 2400' at the shell prompt to set
			% the baud rate to 2400.  Setting this variable
			% properly will synchronize JED's screen writes to
			% your terminal output rate for increased performance.
#endif

%---------------------------------------------------------------------------
% C-mode variables:
%---------------------------------------------------------------------------
C_INDENT	= 3;	% amount of space to indent within block.
C_BRACE		= 2;	% amount of space to indent brace
C_BRA_NEWLINE   = 0;    % If non-zero, insert a newline first before inserting
                        % a '{'.  Many C programmers like this to be 0. A zero
			% value will force '{' to be on same line as insertion.
			% The jed source code uses 1 for this variable.

			% Note that in C mode, the keys '{' and '}' are bound
			% to the commands 'brace_bra_cmd' and 'brace_ket_cmd'
			% respectively.

C_Colon_Offset = 1;     % Controls the indentation of case statements.
C_CONTINUED_OFFSET = 2; % This variable controls the indentation of statements
                        % that are continued onto the next line.
%---------------------------------------------------------------------------

#ifdef UNIX
% JED Email.  JED uses the UC Berkeley mail program for Email.   Most systems
% have this.  Try ^Xm mail and you get an error, uncomment this next line 
% restart JED and try again.  This is definitely the case for Linux.  Again,
% only uncomment out this line if mail fails!

% variable UCB_Mailer; UCB_Mailer = "/bin/mail";
#endif

#ifdef MSDOS XWINDOWS
% Alt-key handling.  Setting this variable controls how the
% Alt key is handled.  By default it is set to 27 (Ascii ESCAPE).  This means
% that any key pressed in conjunction with the alt key produces ESCAPE 
% followed by the key itself.  If ALT-X is pressed, an ESCAPE-X is generated.
% Set it to zero to turn off Alt key processing.  On XWindow systems, setting
% this to zero will cause the high bit to be set on the character.
% ALT_CHAR = 27;

#endif

%    Mute (dead or accent) keys 
%    Valid Mute keys are:
%      ^, ~, ', `, \d168 (ISO Diaeresis), \d180 (ISO Acute), and \".
%    This means pressing this key then the key you want to accent yields
%     the accented character.  If you do not know what this is, you do not
%     need them.  By default, they are turned off.

%mute_set_mute_keys (" ^ ~ ' ` \d168 \d180 \"  ");  % choose all or subset

%
% 8 bit stuff  -- see documentation for a complete discussion
%

META_CHAR	= -1;	% All chars with hi bit set will self insert

#ifdef MSDOS OS2
  DISPLAY_EIGHT_BIT = 1;
#else
  DISPLAY_EIGHT_BIT = 160; % Other systems assume ISO Latin 1
#endif

#ifndef XWINDOWS
%  COLORS: 
%
%  Note that to use the colors below with MS-Kermit, do 
%  'set term color 30 47' at the MS-Kermit prompt.
%  (See the file 'colors.txt' for a description of using JED with color 
%  terminals.)

%  Foreground and background:
%    "black", "blue", "green", "cyan", "red", "magenta", "brown", "lightgray"
%  Foreground Only:
%    "gray", "brightblue", "brightgreen", "brightcyan", "brightred", 
%    "brightmagenta", "yellow", "white"
%  This is a limitation of video adapters on PC systems.  For MSDOS, I 
%  reprogram the controller so that high intensity background colors may be
%  displayed.  There does not seem to be a way to do this in MS-Kermit.
#ifdef UNIX VMS
   TERM_BLINK_MODE = 0;
#endif
   $1 = "black"; $2 = "white";
   set_color("menu", "white", "blue"); 		  % menu bar    
   set_color("normal", $1, $2);	                  % default fg/bg
   set_color("status", "yellow", "blue");	  % status or mode line
   set_color("region", "yellow", "brightmagenta");% for marking regions
   set_color("operator", $1, $2);      		  % +, -, etc..  
   set_color("number", "brightblue", $2);	  % 10, 2.71,... TeX formulas
   set_color("comment", "magenta", "brightcyan"); % /* comment */  
   set_color("string", "brightblue", $2);	  % "string" or 'char'  
   set_color("keyword", "brightred", $2);	  % if, while, unsigned, ...  
   set_color("keyword1", "green", $2);	          % malloc, exit, etc...
   set_color("delimiter", $1, $2);     		  % {}[](),.;...  
   set_color("preprocess", "magenta", $2);	  % #ifdef ....  
   set_color("message", "blue", $2);              % color for messages
   set_color("error", "brightred", $2);           % color for errors
   set_color("dollar", "magenta", $2);            % color dollar sign continuation
   set_color("...", "red", $2);			  % folding indicator

#ifdef UNIX VMS
if (USE_ANSI_COLORS) call ("redraw");
#else
   call("redraw");
#endif
#endif  XWindows

#ifdef UNIX
%
%  Terminal type.  By default, on Unix termcap is used.  However, some
%  (if not all) termcaps do not include AL, DL strings for vtxxx terminals.
%
%  True blue vt100 terminals cannot insert and delete lines so the AL and DL
%  termcap entries are not appropriate for them.  However, almost no one
%  uses a true vt100 terminal anymore but they set their TERM variable to
%  vt100 just the same.  If you do not like the way your terminal scrolls,
%  and it is more than a vt100, either set your TERM variable appropriately
%  or add vt100 to the list below. 
%  
  $1 = "vt102 vt200 vt220 vt300 vt320 vt420 xterms";

  if (is_substr($1, getenv("TERM"))) set_term_vtxxx(0);

#endif
  

%  Compiler interface --- uncomment one of the following:
% 
compile_parse_error_function = "gcc";           % GNU compiler
% compile_parse_error_function = "Ultrix_cc";     % cc on Ultrix
%compile_parse_error_function = "bcc";           % Borlands BCC
% compile_parse_error_function = "sun_acc";       % SunOS C++ and ACC
% compile_parse_error_function = "hp_cc";         % HPUX cc


%
%  Hooks:  read jed/doc/hooks.sl for more information
%
define dired_hook ()
{
   local_unsetkey ("^K");
   local_setkey ("dired_kill_line", "^K");
}

%define text_mode_hook ()
%{
%}
%
%define fortran_hook ()
%{
%}
%
%define tex_mode_hook ()
%{
%}
%
%define c_mode_hook ()
%{
%}
%
%define mail_hook ()
%{
%   local_unsetkey ("^C");
%   local_setkey ("send", "^C^C");   %emacs-like
%}
%
%define slang_mode_hook ()
%{
%}
%
%define dired_mode_hook ()
%{
%}

%-----------------------------------------------------------------------
%
%  Insert contents of other window
%
define insert_other_window()
{
  if (nwindows() != 2) return;
  otherwindow();
  whatbuf();
  otherwindow();
  insbuf();
}