home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / vms / 18259 < prev    next >
Encoding:
Text File  |  1992-11-20  |  3.8 KB  |  103 lines

  1. Newsgroups: comp.os.vms
  2. Path: sparky!uunet!mcsun!Germany.EU.net!ira.uka.de!rz.uni-karlsruhe.de!usenet
  3. From: DAHMS@ifk20.mach.uni-karlsruhe.de (Heribert Dahms)
  4. Subject: Re: Is it possible to DEFINE KEY in edit/edt AS EXIT?
  5. In-Reply-To: mzraly@ra.cs.umb.edu's message of 20 Nov 92 09: 38:22 GMT
  6. Message-ID: <1992Nov20.164619.16257@rz.uni-karlsruhe.de>
  7. Sender: usenet@rz.uni-karlsruhe.de (USENET 'No news is bad news' News System)
  8. Organization: University of Karlsruhe, FRG (Dept. of Mechanical Engineering)
  9. References:  <1992Nov20.093822.21259@cs.umb.edu>
  10. Date: Fri, 20 Nov 1992 16:46:19 GMT
  11. X-News-Reader: VMS NEWS 1.20
  12. Lines: 89
  13.  
  14. In <1992Nov20.093822.21259@cs.umb.edu> mzraly@ra.cs.umb.edu writes:
  15.  
  16. > I am writing a *very* simple data-entry program for use by a few people
  17. > with no experience whatsoever with editing on VMS systems.  I find it
  18. > easiest to use EDIT/EDT for the data entry part, but I would like to
  19. > avoid having to remind the users to type CONTROL-ZexitRETURN: I'd
  20. > much rather be able to have them type, for instance, CONTROL-X or F10
  21. > and have EDT interpret this as CONTROL-ZexitRETURN somehow.
  22. > The "obvious" DEFINE KEY CONTROL X AS 'EX.' does not work, since the
  23. > nokeypad command EX just leaves nokeypad mode for line mode.
  24. > For various reasons, I'd rather *not* use edit/tpu, although obviously
  25. > that would solve the problem.
  26. > On another note, I would like to have the numeric keypad kept in
  27. > numeric mode rather than application mode: I cannot seem to do this in
  28. > any way in EDT.  My current solution is to SPAWN/NOWAIT a subprocess
  29. > that SET TERM/NUMERIC <terminal-name> after waiting a fraction of a
  30. > second, but this is a pretty ugly solution.  Can anyone tell me any
  31. > better solution?
  32. > Thanks,
  33. >   Mike
  34. > -- 
  35. > Mike Zraly        The first duty of a revolutionary is to get away
  36. > mzraly@cs.umb.edu    with it.    -- Abbie Hoffman
  37.  
  38. Yes, you can,
  39. Heribert
  40.  
  41. Here is my version of EDTINI.EDT :
  42. ! Set-up:
  43. !
  44. ! Suppress the bell or buzzer that signals errors
  45. SET QUIET
  46. ! Define delimiters for the word entity
  47. SET ENTITY WORD '     .,?!;:[]()<>*-+=/\'
  48. ! Define delimiters for the sentence entity
  49. SET ENTITY SENTENCE '. ?!'
  50. ! Suppress line numbers in line mode
  51. SET NONUMBERS
  52. ! Wrap full words to the next line at 75 characters
  53. !SET WRAP 75
  54. SET NOWRAP
  55. !
  56. ! Key Definitions:
  57. ! Change to the specified buffer
  58. DEFINE KEY GOLD B AS "EXT CHANGE =?'CHANGE TO BUFFER: '."
  59. ! Change to the last current line in the previous buffer
  60. DEFINE KEY GOLD C AS "EXT CHANGE LAST."
  61. ! Change the case of the current word
  62. DEFINE KEY GOLD D AS "+CHGCW."
  63. ! Locate the last current line in the MAIN buffer
  64. DEFINE KEY GOLD G AS "EXT FIND=MAIN.."
  65. ! Prompt for a buffer name and then locate the last current line
  66. ! in the specified buffer
  67. DEFINE KEY GOLD H AS "EXT FIND=?*'BUFFER:  '.."
  68. ! Exit file
  69. DEFINE KEY GOLD E AS "EXT EXIT."
  70. ! Fill the text of the current paragraph to the right margin
  71. DEFINE KEY GOLD P AS "FILLPAR."
  72. ! Quit file
  73. DEFINE KEY GOLD Q AS "EXT QUIT."
  74. ! Shift screen left 1 tab (8 columns)
  75. DEFINE KEY GOLD L AS "SHL."
  76. ! Shift screen right 1 tab (8 columns)
  77. DEFINE KEY GOLD R AS "SHR."
  78. ! Replace all occurrences of the specified string in the 
  79. ! current buffer with the specified string
  80. DEFINE KEY GOLD S AS "EXT S/?*'REPLACE: '/?*'   WITH: '/WHOLE."
  81. ! Transpose the two characters to the left of the cursor
  82. DEFINE KEY GOLD T AS "BACK C DC ADV C UNDC."
  83. ! Write the current buffer to the specified file
  84. DEFINE KEY GOLD W AS "EXT WRITE ?*'WRITE TO FILE: '."
  85. ! Include the specified file at the current line
  86. DEFINE KEY GOLD X AS "EXT INCLUDE ?*'INCLUDE FILE: '."
  87. ! Include the specified file at the beginning of 
  88. ! the specified buffer
  89. DEFINE KEY GOLD Y AS "EXT INCLUDE ?*'INCLUDE FILE: ' =?*' BUFFER: ';FIND BEGIN."
  90. ! F17 inserts opening bracket
  91. DEFINE KEY FUNCTION 31 AS "I{."
  92. ! F18 inserts closing bracket
  93. DEFINE KEY FUNCTION 32 AS "I}."
  94. !
  95. ! Select editing mode: 
  96. SET MODE CHANGE
  97.