1%   User Initialization file for the JED editor  -*- slang -*-
2%   If a user does not have a startup file in the user's home directory,
3%   JED will automatically load this from JED_ROOT/lib.   Thus it is easier
4%   for a system manager to make defaults for all users.
5
6%   Do not edit this file directly.  Instead, copy it to your home
7%   directory (sys$login:jed.rc on VMS or $HOME/.jedrc on Unix) and edit
8%   the resulting file.
9
10%   To uncomment a line, simply remove any leading '%' characters.
11
12%   This file is divided into various sections.  The first section pertains
13%   to keybindings (e.g., Wordstar, Emacs, EDT, etc...) and the following
14%   sections pertain to user preferences such as default TAB sizes, line
15%   and column numbers on status line, colors, indentation style, etc...
16
17if (BATCH == 0)
18{
19%----------------------------------------------------------------------
20%  Keybindings  (not loaded for batch processes)
21%
22%    Default bindings are Emacs-like with EDT emulation on Unix and VMS.
23%    For the PC, only Emacs is enabled by default.  If you do not want EDT
24%    bindings, simply coment out the appropriate line.
25%
26%    For Wordstar like bindings, comment out EDT and Emacs lines and
27%    uncomment Wordstar line.  A similar statement applies for BRIEF,
28%    and for Borland IDE-like bindings.
29%
30%  () = evalfile("emacs");           % Emacs-like bindings
31%  () = evalfile("edt");             % EDT emulation
32%  () = evalfile ("ide");            % Borland IDE (see also doc/ide-mode.txt)
33%  () = evalfile ("brief");          % Brief Keybindings (MSDOS only!!)
34%  () = evalfile("wordstar");        % obsolete --- use ide instead)
35%  () = evalfile ("cua");            % CUA-like key bindings
36%  Note: For EDT emulation, jed386.exe requires that the GOLD.COM TSR
37%        be loaded.  This TSR is available from space.mit.edu:/pub/davis/jed.
38
39% Some of the above emulations may set keys that conflict with access to
40% the menubars.  For example, emacs uses ESC-f to move by words.  The
41% next line causes the keys to activate the menus.  Comment this out
42% to preserve the emulation.
43   enable_menu_keys ();
44
45% If you use jed inside an XTerminal, you can use the mouse to access the
46% menus and move the cursor by uncommenting the next line:
47%  enable_xmouse ();
48
49% What should the Ctrl-H key do??
50%
51%  setkey ("bol", "^H");              % causes ^H to go to beg of line (EDT)
52%  setkey ("help_prefix", "^H");      % Uncomment to have Ctrl-H as help
53
54#ifdef XWINDOWS
55   % See xjed.txt for information regarding the delete key under X Windows.
56   %    x_set_keysym (0xFFFF, 0, "\e[3~");
57   %    setkey ("delete_char_cmd", "\e[3~");
58#endif
59   %  !!!!  ^S/^Q flow control problems !!!!
60   %  if you experience problems with JED suddenly going into search mode
61   %  for some reason then you are a victim of the emacs emulation's
62   %  binding of the ^S key to the search function.
63   %  TO prevent this from happening, either find out how to
64   %  prevent unwanted ^S/^Q characters or uncomment the next line:
65#ifdef UNIX
66   %enable_flow_control (1);
67#endif
68
69%----------------------------------------------------------------------
70
71%  Initial help screen --- comment out to disable.
72%  Note that for the help to be valid, it must occur AFTER bindings are
73%  loaded.
74
75% help();               % Pops up a help window
76
77}  %Batch
78
79%%%%%%%%%%%%%%%% top menu bar %%%%%%%%%%%%%%%
80
81% To disable it, uncomment the next line.  Note that menus will still be
82% available but the menubar will be hidden when not in use.
83% enable_top_status_line (0);
84
85
86%---------------------------------------------------------------------------
87% User Information (used by some modes, automatically determined on Unix)
88%---------------------------------------------------------------------------
89% set_realname ("John Doe");
90% set_username ("jd");
91% set_hostname ("no.where.com");
92% set_emailaddress ("jd@no.where.com");
93
94
95%----------------------------------------------------------------------
96% JED global variables  --- defaults shown
97%
98#ifdef VMS UNIX
99%USE_ANSI_COLORS = 1;   % if non-zero, JED will display colors on a color
100                        % terminal (Unix and VMS only) See doc/color.txt
101                        % for more discussion and look below for setting
102                        % the colors.
103#endif
104No_Backups = 0;         % If non-zero, backup files will not be created.
105Startup_With_File = 1;  % if greater then zero, force JED to prompt for a file
106                        %   if none is specified on the command line.  If
107                        %   negative, inhibit startup message.
108DISPLAY_TIME    = 1;    % non-zero enables the time to be displayed on
109                        %  status line, zero disables it.  If this value
110                        %  is -1, 24 hour time will be used.
111HIGHLIGHT	= 1;	% non-zero for region highlighting
112WANT_SYNTAX_HIGHLIGHT = 1;
113                        % Highlight syntax in C, Fortran, and TeX modes.
114                        % See section on colors
115                        %  below for choosing how to highlight.  On Unix and
116                        %  VMS systems, USE_ANSI_COLORS must also be non-zero.
117HORIZONTAL_PAN	= 20;	% if zero, no automatic panning.  If positive, only
118                        % the current line is panned.  If negative, pan window.
119#ifdef IBMPC_SYSTEM
120  HORIZONTAL_PAN  = -1; % For msdos, panning window might be better:
121#endif
122
123#ifdef IBMPC_SYSTEM
124  LINENUMBERS	= 2;	% A value of zero means do NOT display line number on
125#else                   % status line line.  A value of 1, means to display
126  LINENUMBERS	= 1;	% the linenumber. A value greater than 1 will also
127#endif			% display column number information.  I recommend a
128			% value of 2 only at high baud rates
129
130BLINK		= 1;	% if non zero, blink matching parenthesis
131TAB_DEFAULT	= 8;	% Tab size  (also try edit_tab_stops)
132USE_TABS	= 1;	% Use tabs when generating whitespace.
133
134Tab_Always_Inserts_Tab = 0; % Set this to 1 if you want the tab key to insert
135                            % tabs.
136
137WRAP_DEFAULT	= 72;	% wrap column
138ADD_NEWLINE	= 1;	% add newline to file when writing if one not present
139IGNORE_BEEP	= 3;	% Beep terminal during error messages---
140                        %  1 == sound only, 2 = visible bell only, 3 = both
141_traceback	= 0;	% Non zero means dump traceback on S-Lang errors
142WRAP_INDENTS	= 0;	% Non zero indents next line after wrapping current.
143			%  Make this a 1 if you want indented text mode.
144%KILL_LINE_FEATURE = 0;
145			% If non-zero, kill line will kill through end of the
146			%  line if Point is at the beginning of the line. For
147			%  emacs-like behavior, set this to zero.
148
149%---------------------------------------------------------------------------
150% C-mode indentation style
151%---------------------------------------------------------------------------
152c_set_style ("jed"); % or "linux", "gnu", "bsd", "k&r"
153
154#ifdef IBMPC_SYSTEM
155% If non-zero, treat file names as case sensitive
156Case_Sensitive_Filenames = 0;
157#endif
158
159%---------------------------------------------------------------------------
160
161#ifdef MSDOS XWINDOWS MSWINDOWS
162% Alt-key handling.  Setting this variable controls how the
163% Alt key is handled.  By default it is set to 27 (Ascii ESCAPE).  This means
164% that any key pressed in conjunction with the alt key produces ESCAPE
165% followed by the key itself.  If ALT-X is pressed, an ESCAPE-X is generated.
166% Set it to zero to turn off Alt key processing.  On XWindow systems, setting
167% this to zero will cause the high bit to be set on the character.
168%ALT_CHAR = 27;
169
170#endif
171
172%    Mute (dead or accent) keys
173%    Valid Mute keys are:
174%      ^, ~, ', `, \d168 (ISO Diaeresis), \d180 (ISO Acute), and \".
175%    This means pressing this key then the key you want to accent yields
176%     the accented character.  If you do not know what this is, you do not
177%     need them.  By default, they are turned off.
178
179%mute_set_mute_keys (" ^ ~ ' ` \d168 \d180 \"  ");  % choose all or subset
180
181META_CHAR	= -1;	% All chars with hi bit set will self insert
182
183#ifdef IBMPC_SYSTEM
184%  DISPLAY_EIGHT_BIT = 128;
185#else
186%  DISPLAY_EIGHT_BIT = 160; % Other systems assume ISO Latin 1
187#endif
188
189% Color Settings
190% Look at jed/lib/colors/README for a description of predefined color
191% schemes.
192%set_color_scheme ("black3");
193%set_color_scheme ("blue2");
194
195#ifdef UNIX
196%
197%  Terminal type.  By default, on Unix termcap is used.  However, some
198%  (if not all) termcaps do not include AL, DL strings for vtxxx terminals.
199%
200%  True blue vt100 terminals cannot insert and delete lines so the AL and DL
201%  termcap entries are not appropriate for them.  However, almost no one
202%  uses a true vt100 terminal anymore but they set their TERM variable to
203%  vt100 just the same.  If you do not like the way your terminal scrolls,
204%  and it is more than a vt100, either set your TERM variable appropriately
205%  or add vt100 to the list below.
206%
207
208if (0)
209{
210   $1 = "vt102 vt200 vt220 vt300 vt320 vt420 xterms";
211   if (is_substr($1, getenv("TERM"))) set_term_vtxxx(0);
212}
213#endif
214
215
216%  Compiler interface --- uncomment one of the following:
217%
218% variable Compile_Default_Compiler = "gcc";           % GNU compiler
219% variable Compile_Default_Compiler = "Ultrix_cc";     % cc on Ultrix
220% variable Compile_Default_Compiler = "bcc";           % Borlands BCC
221% variable Compile_Default_Compiler = "sun_acc";       % SunOS C++ and ACC
222% variable Compile_Default_Compiler = "hp_cc";         % HPUX cc
223#ifdef WIN32
224variable W32shell_Perform_Globbing = 0;
225#endif
226
227%
228%  Hooks:  read jed/doc/hooks.sl for more information
229%
230define global_mode_hook (hook_name)
231{
232   % if (hook_name != "c_mode_hook")
233   %   local_setkey ("self_insert_cmd", "\t");
234}
235
236define dired_hook ()
237{
238   %local_unsetkey ("^K");
239   %local_setkey ("dired_kill_line", "^K");
240}
241