home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / editors / 2763 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  2.8 KB

  1. Xref: sparky comp.editors:2763 comp.unix.questions:13461 comp.editors:2764
  2. Newsgroups: comp.editors,comp.unix.questions,comp.editors
  3. Path: sparky!uunet!spool.mu.edu!uwm.edu!linac!uchinews!oddjob.uchicago.edu!kashyap
  4. From: kashyap@oddjob.uchicago.edu (Vinay Kashyap)
  5. Subject: where no vi has gone before...?
  6. Message-ID: <1992Nov16.044152.27799@midway.uchicago.edu>
  7. Summary: questions on vi use
  8. Sender: news@uchinews.uchicago.edu (News System)
  9. Organization: U. of Chicago, Astronomy and Astrophysics
  10. Date: Mon, 16 Nov 1992 04:41:52 GMT
  11. Lines: 56
  12.  
  13. I have this list of questions (problems/wishes/...) on vi, and wonder
  14. if anyone has come across similar occurances.  If so, please email me,
  15. and I will post a summary.
  16.  
  17. (I am using X11R5, 
  18. tcsh 5.20.02 (Cornell) 12/07/90 options 8b,nls,el,dl,al,dir
  19. on Sun Sparc)
  20.  
  21. 1. I keep a list of macros in a file and pick them up by first going to
  22.    the file with :e <file> and then moving to the necessary map and
  23.    typing (the equivalent of) "aY@a (this is mapped to a key...)
  24.    The problem is that the following map does not work, while all the
  25.    others do:
  26.    :map [f :!echo -n "^V^[]2;%^G"^V^M^V^M
  27.    (where ^V is ctrl-V, ^[ is ESC, ^G is ctrl-G, and this is exactly what
  28.    it LOOKS like from inside vi)
  29.    upon typing "aY@a on this line, the echo sequence is mapped to [f
  30.    (looks perfect when you do a :map)
  31.    now, if I type [f in command mode (and provided that I am using
  32.    xterm) the name of the file should be echoed on the titlebar.
  33.    however, it exits with the error
  34.    Unmatched ".
  35.    and does nothing.
  36.    On the other hand, if I were to actually type
  37.    :!echo -n "^[]2;%^G"^M^M
  38.    (with the necessary ^V before ESC) it works as expected.
  39.    What is missing here?
  40.  
  41. 2. Is there a simple macro that yanks text from a marked position up
  42.    to and INCLUDING the cursor position?  The method should work even
  43.    for end-of-line characters.
  44.  
  45. 3. Is there a way to prepend or append characters to macros without
  46.    (a) introducing newlines between the additions, &/or
  47.    (b) writing to the file and deleting to a named buffer
  48.  
  49. 4. Typing ^G or :se nu in the command mode tells us the line number
  50.    the cursor is on.  Are there equivalent commands/macros that tell
  51.    us the column number?
  52.  
  53. 5. I recently read on the net that someone has a macro that can extract
  54.    a rectangle.  I would like more information on it, please.
  55.  
  56. 6. For some reason, I cannot get the <ctrl-SPACE> (^@) to echo on my
  57.    terminal.  Nor in vi.  Every time I try, a beep is emanated, and
  58.    nothing happens.  It is not mapped to anything that I can see.  Is
  59.    this a tcsh 'feature'?  Why does it not echo with a preceding ^V in
  60.    vi?
  61.  
  62. 7. Similar to the previous question: Can I echo mouse keyclicks on the
  63.    command line, and/or can I map them in vi?
  64.  
  65. 8. Is it at all possible to position the cursor by clicking with the
  66.    mouse?
  67.  
  68. Vinay (kashyap@oddjob.uchicago.edu)
  69.