home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / AP / JED / JED097-1.TAR / jed / lib / jed.rc < prev    next >
Encoding:
Text File  |  1994-12-12  |  11.4 KB  |  315 lines

  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_LIBRARY.   Thus is 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.  
  17. if (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.
  28. %
  29.  
  30.    () = evalfile("emacs");           % Emacs-like bindings
  31. #ifndef MSDOS OS2
  32.    () = evalfile("edt");             % EDT--- Unix and VMS
  33. %  setkey ("bol", "^H");               % causes ^H to go to beg of line (EDT) 
  34. #else
  35. %      evalfile("edt"); pop();         % EDT--- IBMPC
  36. #endif
  37.  
  38. %     evalfile("wordstar"); pop();     % Wordstar
  39.    
  40.    %  !!!!  ^S/^Q flow control problems !!!!
  41.    %  if you experience problems with JED suddenly going into search 
  42.    %  for some reason then you are a victim of emacs brain dead binding of ^S
  43.    %  to search.  TO prevent this from happening, either find out how to 
  44.    %  prevent unwanted ^S/^Q characters or uncomment the next line:
  45.    
  46.    %enable_flow_control (1);
  47.    
  48.    
  49. %----------------------------------------------------------------------
  50. %
  51. %   TAB key setting  -- by default, the tab key is bound to 'indent_line_cmd'.
  52. %                       If you want a real tab inserted, uncomment next line.
  53. %
  54. %   setkey("self_insert_cmd", "^I");
  55.  
  56. %----------------------------------------------------------------------
  57.  
  58. %  Initial help screen --- comment out to disable.
  59. %  Note that for the help to be valid, it must occur AFTER bindings are 
  60. %  loaded.
  61.    
  62. % help();               % Pops up a help window-- bound to Control-H Control-H
  63.  
  64. }  %Batch
  65.  
  66. %%%%%%%%%%%%%%%% top menu bar %%%%%%%%%%%%%%%
  67.  
  68. % To disable it, uncomment the next line.
  69. % enable_top_status_line (0);
  70.  
  71.  
  72. %----------------------------------------------------------------------
  73. % JED global variables  --- defaults shown
  74. %
  75. #ifdef VMS UNIX
  76. %USE_ANSI_COLORS = 1;   % if non-zero, JED will display colors on a color
  77.                         % terminal (Unix and VMS only) See doc/color.txt 
  78.                         % for more discussion and look below for setting
  79.                         % the colors.
  80. #endif
  81. No_Backups = 0;         % If non-zero, backup files will not be created.
  82. Startup_With_File = 1;  % if greater then zero, force JED to prompt for a file
  83.                         %   if none is specified on the command line.  If 
  84.                         %   negative, inhibit startup message.
  85. DISPLAY_TIME    = 1;    % non-zero enables the time to be displayed on 
  86.                         %  status line, zero disables it.  If this value
  87.                         %  is -1, 24 hour time will be used.
  88. HIGHLIGHT    = 1;    % non-zero for region highlighting
  89. WANT_SYNTAX_HIGHLIGHT = 1;
  90.                         % Highlight syntax in C, Fortran, and TeX modes.
  91.                         % See section on colors
  92.                         %  below for choosing how to highlight.  On Unix and 
  93.                         %  VMS systems, USE_ANSI_COLORS must also be non-zero.
  94. HORIZONTAL_PAN    = 20;    % if zero, no automatic panning.  If positive, only
  95.                         % the current line is panned.  If negative, pan window.
  96. #ifdef MSDOS        % For msdos, panning window might be better:
  97.   HORIZONTAL_PAN  = -1;
  98. #endif
  99.  
  100. #ifdef MSDOS
  101.   LINENUMBERS    = 2;    % A value of zero means do NOT display line number on 
  102. #else                   % status line line.  A value of 1, means to display
  103.   LINENUMBERS    = 1;    % the linenumber. A value greater than 1 will also
  104. #endif            % display column number information.  I recommend a 
  105.             % value of 2 only at high baud rates
  106.  
  107. BLINK        = 1;    % if non zero, blink matching parenthesis
  108. TAB_DEFAULT    = 8;    % Tab size  (also try edit_tab_stops)
  109. WRAP        = 78;    % wrap column
  110. ADD_NEWLINE    = 1;    % add newline to file when writing if one not present
  111. IGNORE_BEEP    = 3;    % Beep terminal during error messages---
  112.                         %  1 == sound only, 2 = visible bell only, 3 = both
  113. _traceback    = 0;    % Non zero means dump traceback on S-Lang errors
  114. WRAP_INDENTS    = 0;    % Non zero indents next line after wrapping current.
  115.             %  Make this a 1 if you want indented text mode.
  116. %KILL_LINE_FEATURE = 0;
  117.             % If non-zero, kill line will kill through end of the 
  118.             %  line if Point is at the beginning of the line. For
  119.             %  emacs-like behavior, set this to zero.
  120. #ifndef MSDOS OS2
  121. OUTPUT_RATE    = 0;     % Should be set automatically by JED. It is the 
  122.                         % of chars sent to terminal / second.  (0 = Infinity)
  123.             % 
  124.             % If JED pauses during screen updates, then you need
  125.             % to set your baud rate properly or simply set this
  126.             % variable to zero.  JED is not slow, rather it assumes
  127.             % your terminal is, so JED sleeps when writing to the
  128.             % terminal.  By default, this is set to zero.  I 
  129.             % suggest that you comment it out and let JED set it 
  130.             % ASSUMING YOUR BAUD RATE IS CORRECT.  For example, on
  131.                         % Unix, enter 'stty 2400' at the shell prompt to set
  132.             % the baud rate to 2400.  Setting this variable
  133.             % properly will synchronize JED's screen writes to
  134.             % your terminal output rate for increased performance.
  135. #endif
  136.  
  137. %                           C-mode variables:
  138.  
  139. C_INDENT    = 3;    % amount of space to indent within block.
  140. C_BRACE        = 2;    % amount of space to indent brace
  141. C_BRA_NEWLINE   = 0;    % If non-zero, insert a newline first before inserting
  142.                         % a '{'.  Many C programmers like this to be 0. A zero
  143.             % value will force '{' to be on same line as insertion.
  144.                 
  145.             % Note that in C mode, the keys '{' and '}' are bound
  146.             % to the commands 'brace_bra_cmd' and 'brace_ket_cmd'
  147.             % respectively. '}' '}'
  148.  
  149. variable C_No_Brace_Offset = 1;   
  150.                         % Set this variable to the amount of EXTRA space to
  151.                         % add for the indentation of lines following 'if', 
  152.                         % 'else', etc....   Try 0 if you set C_BRA_NEWLINE to
  153.                         % 1.
  154.  
  155. #ifdef UNIX
  156. % JED Email.  JED uses the UC Berkeley mail program for Email.   Most systems
  157. % have this.  Try ^Xm mail and you get an error, uncomment this next line 
  158. % restart JED and try again.  This is definitely the case for Linux.  Again,
  159. % only uncomment out this line if mail fails!
  160.  
  161. % variable UCB_Mailer; UCB_Mailer = "/bin/mail";
  162. #endif
  163.  
  164. #ifdef MSDOS XWINDOWS
  165. % Alt-key handling.  Setting this variable controls how the
  166. % Alt key is handled.  By default it is set to 27 (Ascii ESCAPE).  This means
  167. % that any key pressed in conjunction with the alt key produces ESCAPE 
  168. % followed by the key itself.  If ALT-X is pressed, an ESCAPE-X is generated.
  169. % Set it to zero to turn off Alt key processing.  On XWindow systems, setting
  170. % this to zero will cause the high bit to be set on the character.
  171. ALT_CHAR = 27;
  172.  
  173. #endif
  174.  
  175. %    Mute (dead or accent) keys 
  176. %    Valid Mute keys are:
  177. %      ^, ~, ', `, \d168 (ISO Diaeresis), \d180 (ISO Acute), and \".
  178. %    This means pressing this key then the key you want to accent yields
  179. %     the accented character.  If you do not know what this is, you do not
  180. %     need them.  By default, they are turned off.
  181.  
  182. %mute_set_mute_keys (" ^ ~ ' ` \d168 \d180 \"  ");  % choose all or subset
  183.  
  184. %
  185. % 8 bit stuff  -- see documentation for a complete discussion
  186. %
  187.  
  188. META_CHAR    = -1;    % All chars with hi bit set will self insert
  189.  
  190. #ifdef MSDOS OS2
  191.   DISPLAY_EIGHT_BIT = 1;
  192. #else
  193.   DISPLAY_EIGHT_BIT = 160; % Other systems assume ISO Latin 1
  194. #endif
  195.  
  196. #ifndef XWINDOWS
  197. %  COLORS: 
  198. %
  199. %  Note that to use the colors below with MS-Kermit, do 
  200. %  'set term color 30 47' at the MS-Kermit prompt.
  201. %  (See the file 'colors.txt' for a description of using JED with color 
  202. %  terminals.)
  203.  
  204. %  Foreground and background:
  205. %    "black", "blue", "green", "cyan", "red", "magenta", "brown", "lightgray"
  206. %  Foreground Only:
  207. %    "gray", "brightblue", "brightgreen", "brightcyan", "brightred", 
  208. %    "brightmagenta", "yellow", "white"
  209. %  This is a limitation of video adapters on PC systems.  For MSDOS, I 
  210. %  reprogram the controller so that high intensity background colors may be
  211. %  displayed.  There does not seem to be a way to do this in MS-Kermit.
  212.  
  213.    $1 = "black"; $2 = "white";
  214.    set_color("menu", "white", "blue");           % menu bar    
  215.    set_color("normal", $1, $2);                      % default fg/bg
  216.    set_color("status", "yellow", "blue");      % status or mode line
  217.    set_color("region", "yellow", "brightmagenta");% for marking regions
  218.    set_color("operator", $1, $2);                % +, -, etc..  
  219.    set_color("number", "brightblue", $2);      % 10, 2.71,... TeX formulas
  220.    set_color("comment", "magenta", "brightcyan"); % /* comment */  
  221.    set_color("string", "brightblue", $2);      % "string" or 'char'  
  222.    set_color("keyword", "brightred", $2);      % if, while, unsigned, ...  
  223.    set_color("delimeter", $1, $2);               % {}[](),.;...  
  224.    set_color("preprocess", "magenta", $2);      % #ifdef ....  
  225.  
  226. #ifdef UNIX VMS
  227. if (USE_ANSI_COLORS) call ("redraw");
  228. #else
  229.    call("redraw");
  230. #endif
  231. #endif  XWindows
  232.  
  233. #ifdef UNIX
  234. %
  235. %  Terminal type.  By default, on Unix termcap is used.  However, some
  236. %  (if not all) termcaps do not include AL, DL strings for vtxxx terminals.
  237. %
  238. %  True blue vt100 terminals cannot insert and delete lines so the AL and DL
  239. %  termcap entries are not appropriate for them.  However, almost no one
  240. %  uses a true vt100 terminal anymore but they set their TERM variable to
  241. %  vt100 just the same.  If you do not like the way your terminal scrolls,
  242. %  and it is more than a vt100, either set your TERM variable appropriately
  243. %  or add vt100 to the list below. 
  244. %  
  245.   $1 = "vt102 vt200 vt220 vt300 vt320 vt420 xterms";
  246.  
  247.   if (is_substr($1, getenv("TERM"))) set_term_vtxxx(0);
  248.  
  249. #endif
  250.   
  251.  
  252. variable compile_parse_error_function;
  253. %
  254. %  Compiler interface --- uncomment one of the following:
  255. %
  256. % compile_parse_error_function = "gcc";           % GNU compiler
  257. % compile_parse_error_function = "Ultrix_cc";     % cc on Ultrix
  258. % compile_parse_error_function = "bcc";           % Borlands BCC
  259. % compile_parse_error_function = "sun_acc";       % SunOS C++ and ACC
  260. % compile_parse_error_function = "hp_cc";         % HPUX cc
  261.  
  262.  
  263. %
  264. %  Hooks:  read jed/doc/hooks.sl for more information
  265. %
  266. define dired_hook ()
  267. {
  268.    local_unsetkey ("^K");
  269.    local_setkey ("dired_kill_line", "^K");
  270. }
  271.  
  272. %define text_mode_hook ()
  273. %{
  274. %}
  275. %
  276. %define fortran_hook ()
  277. %{
  278. %}
  279. %
  280. %define tex_mode_hook ()
  281. %{
  282. %}
  283. %
  284. %define c_mode_hook ()
  285. %{
  286. %}
  287. %
  288. %define mail_hook ()
  289. %{
  290. %   local_unsetkey ("^C");
  291. %   local_setkey ("send", "^C^C");   %emacs-like
  292. %}
  293. %
  294. %define slang_mode_hook ()
  295. %{
  296. %}
  297. %
  298. %define dired_mode_hook ()
  299. %{
  300. %}
  301.  
  302. %-----------------------------------------------------------------------
  303. %
  304. %  Insert contents of other window
  305. %
  306. define insert_other_window()
  307. {
  308.   if (nwindows() != 2) return;
  309.   otherwindow();
  310.   whatbuf();
  311.   otherwindow();
  312.   insbuf();
  313. }
  314.  
  315.