home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / editors / 3295 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.6 KB  |  50 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm
  3. From: hansm@cs.kun.nl (Hans Mulder)
  4. Subject: Re: Need help with v -c option
  5. Message-ID: <C1Et66.3I6@sci.kun.nl>
  6. Sender: news@sci.kun.nl (News owner)
  7. Nntp-Posting-Host: zeus.cs.kun.nl
  8. Organization: University of Nijmegen, The Netherlands
  9. References: <1993Jan24.061447.14615@netcom.com>
  10. Date: Mon, 25 Jan 1993 12:25:18 GMT
  11. Lines: 37
  12.  
  13. In <1993Jan24.061447.14615@netcom.com> westes@netcom.com (Will Estes) writes:
  14.  
  15. >I am having problems with vi's -c startup option.  I execute the
  16. >command:
  17.  
  18. >    vi -c  "set wm=12" myfile
  19.  
  20. >I was hoping that this would execute the command set wm=12 before
  21. >I started editing myfile.  What is happening instead is that the 
  22. >commands in my .exrc file execute, but the set wm=12 does not.
  23.  
  24. It works for me, but only if myfile exists.
  25.  
  26. >(Note, there is no set wm command in my .exrc file!)
  27.  
  28. There is one in mine.  Wm ends up being set to 12.  Apparently,
  29. the .exrc is executed first.
  30.  
  31. >What are the rules of precedence here regarding the -c startup
  32. >option and the .exrc file?  Is there some way to force a command
  33. >to execute at startup in addition to the ones found in .exrc?  I
  34. >need some way of starting vi up with a different set of startup
  35. >commands depending on my stty cols setting.
  36.  
  37. Maybe you could make 'vi' an alias for something along the lines
  38. of 'vi -c "set wm=$WHATEVER" /dev/null' and add a "next" to the
  39. end of your .exrc file.
  40.  
  41. >Also, while I'm here, can someone tell me how do you mark a line
  42. >in .exrc as a comment?
  43.  
  44. Start the line with a double quote (").
  45.  
  46. --
  47. Hope this helps,
  48.  
  49. Hans Mulder        hansm@cs.kun.nl
  50.