home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.editors
- Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm
- From: hansm@cs.kun.nl (Hans Mulder)
- Subject: Re: Need help with v -c option
- Message-ID: <C1Et66.3I6@sci.kun.nl>
- Sender: news@sci.kun.nl (News owner)
- Nntp-Posting-Host: zeus.cs.kun.nl
- Organization: University of Nijmegen, The Netherlands
- References: <1993Jan24.061447.14615@netcom.com>
- Date: Mon, 25 Jan 1993 12:25:18 GMT
- Lines: 37
-
- In <1993Jan24.061447.14615@netcom.com> westes@netcom.com (Will Estes) writes:
-
- >I am having problems with vi's -c startup option. I execute the
- >command:
-
- > vi -c "set wm=12" myfile
-
- >I was hoping that this would execute the command set wm=12 before
- >I started editing myfile. What is happening instead is that the
- >commands in my .exrc file execute, but the set wm=12 does not.
-
- It works for me, but only if myfile exists.
-
- >(Note, there is no set wm command in my .exrc file!)
-
- There is one in mine. Wm ends up being set to 12. Apparently,
- the .exrc is executed first.
-
- >What are the rules of precedence here regarding the -c startup
- >option and the .exrc file? Is there some way to force a command
- >to execute at startup in addition to the ones found in .exrc? I
- >need some way of starting vi up with a different set of startup
- >commands depending on my stty cols setting.
-
- Maybe you could make 'vi' an alias for something along the lines
- of 'vi -c "set wm=$WHATEVER" /dev/null' and add a "next" to the
- end of your .exrc file.
-
- >Also, while I'm here, can someone tell me how do you mark a line
- >in .exrc as a comment?
-
- Start the line with a double quote (").
-
- --
- Hope this helps,
-
- Hans Mulder hansm@cs.kun.nl
-