home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / sysadmin / 6542 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.0 KB

  1. Path: sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!master.cs.rose-hulman.edu!master.cs.rose-hulman.edu!news
  2. From: nelson@nextwork.Rose-Hulman.Edu (Randy J. Nelson)
  3. Newsgroups: comp.sys.next.sysadmin
  4. Subject: Re: cursor keys in csh (editmode=emacs)
  5. Date: 17 Nov 1992 01:25:06 GMT
  6. Organization: Computer Science Department at Rose-Hulman
  7. Lines: 40
  8. Distribution: comp
  9. Message-ID: <1e9hliINNfl@master.cs.rose-hulman.edu>
  10. References: <1992Nov10.122831.564@sel.sub.org>
  11. Reply-To: nelson@nextwork.Rose-Hulman.Edu (Randy J. Nelson)
  12. NNTP-Posting-Host: randy-next.nextwork.rose-hulman.edu
  13.  
  14. In article <1992Nov10.122831.564@sel.sub.org> stez@sel.sub.org (Johannes  
  15. Stezenbach) writes:
  16. > I ve set editmode=emacs in a csh running in Terminal.app (NS3.0)
  17. > and I want to use the cursor keys for parsing through the history and
  18. > command line editing.
  19. > I tried to use  bind-to-key PreviousHistEntry ... , but I don t know
  20. > what what to enter in the  key  field of the bind-to-key function.
  21. > Please help !
  22.  
  23. Subject: C7. How do I get the arrow keys to work in csh?
  24.  
  25.   [This is for people who use a terminal app that does vt100 keyboard
  26.   emulation - pasc]
  27.   First, add these lines to your ".cshrc" (preferably between the if and
  28.   endif):
  29.     set editmode = emacs
  30.     set macrofiles = .macros
  31.   Then create a file called ".bindings" and put in it:
  32.     bind-to-key ExecuteNamedMacro '\e['
  33.   And, next, you need to make a file called ".macros" however, this one
  34.   you need to enter some control characters into, because the csh STILL
  35.   cannot write a macro file (And I'm using 2.1). Into this file put:
  36.     A^@^@^@^A^P
  37.     B^@^@^@^A^N
  38.     C^@^@^@^A^F
  39.     D^@^@^@^A^B
  40.   where ^@ means Control-@ and ^A means Control-A, etc. Also, don't put
  41.   in the leading spaces.
  42.   This will set up the left and right arrows to move back and forth on
  43.   the line, and the up and down arrows will cycle through your history.
  44.  
  45. --
  46.  -Randy Nelson
  47.   Workstation Support Manager
  48.   Rose-Hulman Institute of Technology
  49.   Email: Randy.Nelson@Rose-Hulman.Edu               
  50.   
  51.