HDTenEightyP/NetNews huggingface dataset:
From: martelli@cadlab.sublink.org (Alex Martelli)
Newsgroups: comp.editors
Subject: Re: VI explained
Date: 13 Oct 92 08:00:24 GMT
Organization: CAD.LAB S.p.A., Bologna, Italia

rice@ttd.teradyne.com writes:

:After struggling through yet another VI session I have come to the following
:conclusion:
:
:VI IS THE PRODUCT OF A DRUG CRAZED 1960s HIPPIE PROGRAMMER designed to extract
:revenge on the entire UNIX community for unknown reasons forever.......

Be careful when you say that sort of stuff; Bill Joy, vi's author, is
quite a powerful individual nowadays, what with his position in Sun
Microsystems, and should he decide to file a libel suit, such unproven
accusations as that he is, or was, on drugs, could easily make micemeat
out of you.  Not that you wouldn't deserve such fate, either; one just
does not go around accusing specific people of serious crimes without a
shred of reason!  Better start claiming this post was a forgery, fella.
-- 
Email: martelli@cadlab.sublink.org                   Phone: ++39 (51) 6130360
CAD.LAB s.p.a., v. Ronzani 7/29, Casalecchio, Italia   Fax: ++39 (51) 6130294
From: tim@crash.canon.co.uk
Newsgroups: comp.editors
Subject: Re: damn tabs
Date: 7 Oct 92 07:47:48 GMT
Organization: me myself and i

mch@sqwest.wimsey.bc.ca (Mark C. Henderson) writes:
::
|>   Right now I use the Unix "expand" command to remove all the
|>tabs, but it is a tedious process.  Is there a way to request
|>vi to replace the tabs with spaces before it saves the file?
:
|Is
|1G!Gexpand -4
|really all that tedious (of course replace -4 with your favourite width)?

Well it's one character more tedious than

:%!expand -4

Tx. [father forgive me]
-- 
Tim F O'Donoghue <tim@crash.canon.co.uk> <uunet!canon!tim>
Newsgroups: comp.editors
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Vi Formating without using fmt
Originator: tchrist@pixel.convex.com
Date: Wed, 7 Oct 1992 17:13:02 GMT
Distribution: na
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of jc@skyking.uucp (J.C. Webber III):
:Personally, I quit using fmt because it doesn't preserve indentation and
:it loses the double space I like to put between sentences.  

Funny, the version of fmt I use (straight BSD, I think) does indeed
do those things you say yours does not.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist


        "EMACS belongs in <sys/errno.h>: Editor Too Big!" -me
Newsgroups: comp.editors
From: frechett@spot.Colorado.EDU (-=Runaway Daemon=-)
Subject: Re: <CR> in VI macros
Keywords: vi, macros, carriage returns
Organization: University of Colorado, Boulder
Date: Thu, 8 Oct 1992 06:39:04 GMT

In article <gx12H!z0#9@atlantis.psu.edu> barr@pop.psu.edu (David Barr) writes:
>In article <1992Oct6.213438.11555@bnr.ca> mschee@bcarh600.bnr.ca (Michael SamChee) writes:
>>- first, edit a file: "vi file1"
>>- then from within file1, edit another file: ":!vi file2"  
>It's already there.  ^^.
>
>(ctrl-^, depending on the teriminal this is ctrl-6, or ctrl+shift-6)
>
>--Dave

You didn't look at how he was editing the second file.  This is not the 
same as :e file2    which your or me or any sane human being would use
and then we'd all use ^^ to switch back to the first file.  No.. instead
he's calling a new vi in a sub shell.  
Micheal, to answer your question on how to make this work.. It can't be done.  
The keystroke you issue in the second vi session has no bearing on the first 
session and you will ALWAYS come back from that subshell with the same 
responce.  I'd suggest that you use :e file2      and then you can use 
control-^ to get back as Dave suggests..  One of the main advantages to this
method is that you can keep swapping back and forth.. Plus you can 
cut and paste between files.. etc.. Do the the easy way.. do it the 
natural way.

	ian
From: jim@n5ial.chi.il.us (Jim Graham)
Newsgroups: comp.editors
Subject: Vi Formating without using fmt 
Distribution: world
Date: Sun, 11 Oct 92 18:07:22 GMT
Organization: Me? Organized? Hah! :-)

In article <1992Oct7.003638.14933@skyking.uucp> jc@skyking.uucp writes:

> Personally, I quit using fmt because it doesn't preserve indentation and
> it loses the double space I like to put between sentences.

*** SINCE WHEN??? ***  fmt does indeed preserve indentation, and it does
*NOT* lose the standard 2 spaces after a period.  are you sure you don't
just have a broken clone of fmt?

--
#include <std_disclaimer.h>                                 73 DE N5IAL (/9)
------------------------------------------------------------------------------
INTERNET:  jim@n5ial.chi.il.us  |  grahj@gagme.chi.il.us  |  j.graham@ieee.org
ICBM:  41.70N 87.63W                    UUCP:  gagme!n5ial!jim@clout.chi.il.us
AMATEUR RADIO: n5ial@n9hsi (Chicago.IL.US.Earth)    AMTOR SELCAL:  NIAL
------------------------------------------------------------------------------
From: nickp@BNR.CA ("Nick  Pitfield", N.T.)
Newsgroups: comp.editors
Subject: Vi help needed
Date: 8 Oct 92 10:25:01 GMT

Greetings,

We have a large application running across 5 networked HP9000 425s running HPUX
7.05. This application has a command line interface (CLI) which uses 'vi' for
viewing and editing files. We only need simple file viewing/editing facilities,
so vi is a bit over the top, but it's too late to change now....

It is imperative that users of this system are not able to shell out from vi to
Unix, so we currently have an .exrc file (owner=root, group=root, perms=644) in
the user's home directory which maps CTRL-C & CTRL-Z to ESC and sets 'shell' to
'NOSHELL'. However, we've found that the knowledgeable user can still shell out
by resetting shell to /bin/sh or similar.

Does anybody know a sure-fire way of preventing shelling out to Unix ? I tried
mapping ':' to ESC but vi complained that this was too dangerous to map....

Regards.


	Nick Pitfield.

/==============================================================================\
|| INTERNET  : Nick.Pitfield@x400gate.bnr.ca                                  ||
|| VOICE     : ITN - (590) 4476 : BT - +44 628 794476                         ||
|| SNAILMAIL : BNR Europe Ltd, BNR Park, Maidenhead, Berkshire SL6 4AG, UK.   ||
|==============================================================================|
|| "More than high performance, more than just a spark,                       ||
||  More than just the bottom line, or a lucky shot in the dark."             ||
||                                          "Marathon" (Rush - Power Windows) ||
\==============================================================================/
From: barr@pop.psu.edu (David Barr)
Newsgroups: comp.editors
Subject: Re: using TMPDIR in vi as an env variable ?
Date: 13 Oct 92 00:36:17 GMT
Article-I.D.: atlantis.lh-1Hkwg3a
Organization: Penn State Population Research Institute

In article <bshaw.718833968@bobasun> bshaw@spdc.ti.com (Bob Shaw) writes:
>
>Hi 
>I was asked the other day to help this lady edit a file
>using vi .  This file was ~ 20mbyte ascii file.  
>
>Of course, my system (a sun4) complained about not enough
>room in /tmp (or /var/tmp).  
>This didn't work.

:set directory=/my/big/tmp/dir

--Dave
-- 
System Administrator, Population Research Institute    barr@pop.psu.edu
  loose: v. to set free, or adj. not securely fastened.
  lose: v. to miss from one's possession.
Newsgroups: comp.editors
From: sue@netcom.com (Sue Miller)
Subject: Re: damn tabs
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Wed, 14 Oct 1992 19:19:03 GMT

Robert R. Bailey writes:
    I use a macro to expand tabs.  I use it frequently.
  
      :map T :%s/^I/    /g
  

-=Runaway Daemon=- responds:
   WHat would happen if I had a file with
   a	b    
   aa	b
   aaa	b
   aaaa	b
   aaaaa	b
   aaaaaa	b
   aaaaaaa	b
   Between the last 'a' and the 'b' is a tab in every case.. Methinks
   your macro will make a mess.. to state it mildly.
   
  Or is there something particularly clever we're all missing?

---

Who's "we"?  I didn't miss anything. I think you did tho.  When
did anyone make the claim that the above macro should be applied
to all files?  It is only intended for replacing tabs in program
source or similar text.
From: jim@n5ial.chi.il.us (Jim Graham)
Newsgroups: comp.editors
Subject: Vi help needed 
Distribution: world
Date: Thu, 15 Oct 92 17:01:48 GMT
Organization: Me? Organized? Hah! :-)

In article <"16177.Thu.Oct.8.06 nickp@BNR.CA writes:

first off, *PLEASE* insert a CR every now and then....as in, before you
reach 80 columns, as opposed to 360 or so, like the SINGLE LINE I'm
quoting below....  thanks.  if not, please use fmt to do it for you.

> It is imperative that users of this system are not able to shell out
> from vi to> Unix, so we currently have an .exrc file (owner=root,
> group=root, perms=644) in> the user's home directory which maps CTRL-C &
> CTRL-Z to ESC and sets 'shell' to> 'NOSHELL'. However, we've found that
> the knowledgeable user can still shell out> by resetting shell to
> /bin/sh or similar.

I won't ask why you would want to prevent users from shelling out, but
I realize that there are some companies (I used to work for one) who are
really paranoid about these things, so I won't touch that one.....

but I do have an idea for you.  it's very simple, really.  you simply
execute the following commands:
   % su
   # cd /bin
   # rm -f sh csh ksh tcsh [any other shells]

this way, nobody can have shell access on your system, which I assume is
what you want.  be sure not to remove the BBS program (I'm assuming this
is for a UNIX-based BBS system).  oh, you might want to leave /bin/sh
for root, so you might want to do this instead:

   % su
   # cd /bin
   # rm -f csh ksh tcsh [any other shells]
   # chown root sh
   # chmod 700 sh

also, guess what....  since the user owns their $HOME directory, they
can still rm the .exrc file you've created with a simple rm -f, so
that doesn't do *ANYTHING* for you (consider:  :!rm -f $HOME/.exrc).

and there's always the simple fact that they can use :!/bin/sh to shell
out.  and you can't exactly take all of that away, since that's how you
access the fmt command....

of course, if this is for a UNIX-based BBS system, why do you care if
they have access to vi at all?  what could they possibly need it for?
if they need an editor for something, just give them simped or
something similar, and rm vi from the system (or at least, from general
access).

still confused as to why this needs to be done, but....
   --jim

--
#include <std_disclaimer.h>                                 73 DE N5IAL (/9)
------------------------------------------------------------------------------
INTERNET:  jim@n5ial.chi.il.us  |  grahj@gagme.chi.il.us  |  j.graham@ieee.org
ICBM:  41.70N 87.63W                    UUCP:  gagme!n5ial!jim@clout.chi.il.us
AMATEUR RADIO: n5ial@n9hsi (Chicago.IL.US.Earth)    AMTOR SELCAL:  NIAL
------------------------------------------------------------------------------

Newsgroups: comp.editors
From: cgf@ednor.bbc.com (Chris Faylor)
Subject: Defining ^Z in MSDOS version of elvis
Organization: Boston Business Computing, Ltd.
Date: Wed, 7 Oct 1992 16:38:37 GMT

Anybody have any hints as to how I can map ^Z in my elvis.rc file?
When elvis reads the file it considers the ^Z to be EOF (welcome to
1981) and terminates its reading of the file.  So, the map command
and everything after it is never read.

I've tried prefixing the ^Z with a ^V but I really didn't expect it
to work since this kind of operation is hardwired into the C runtime.

Any ideas anybody?
-- 
Chris Faylor		Boston Business Computing, Ltd.
cgf@ednor.bbc.com	"I am not here."
Newsgroups: comp.editors
From: hansm@cs.kun.nl (Hans Mulder)
Subject: Re: <CR> in VI macros
Organization: University of Nijmegen, The Netherlands
Date: Thu, 8 Oct 1992 16:09:51 GMT

In <1992Oct7.163036.7606@bnr.ca> mschee@bcarh600.bnr.ca (Michael SamChee) writes:

>What you suggest is true. But what I *really* want to do is to
>invoke TAGS from within a vi session, ie, ":!vi -t identifier"
>and not ":!vi file" as given in the example above.
>Sorry, for giving a misleading example.

Ah!  That's any easy one:

	:tag identifier

or, if the cursor just happens to sit on the first char of your
identifier, just a control-] .   It might work better if you've

	:set autowrite

but then, that's a good idea anyway.

--
Hans Mulder			hansm@cs.kun.nl
Newsgroups: comp.editors
From: lewis@bnrmtl.bnr.ca (Pierre LEWis)
Subject: Re: damn tabs
Reply-To: lew@bnr.ca (Pierre LEWis)
Organization: Bell-Northern Research Montreal, Canada
Date: Thu, 8 Oct 92 12:51:47 GMT

In article <annius.718533231@freyr> annius@sif.research.ptt.nl (Annius
Groenink) writes:

> >:our printer setup assumes, by default, that they mean 3!
>
> Which is a hell of a lot more practical than 8. I don't know who invented the
> eight but s/he must have been stupid. Of course you would want one level of
> indentation to be the same as one tab. I think either we should stop using tabs
> at all or abolish the tab=8 standard and make it tab=3. I would love to swap
> printers ... but I suppose you're not interested in a 9 pin matrix printer.

Entirely agree.  But the weight of history being what it is, I've given up
long ago and stopped using tabs.  No, I'm not very interested in a 9 pin
printer (and in addition, I can modify my printer's default to what I want).
Sorry...
-- 
Pierre LEWIS    +1 514 765-8207      ESN 852-8207
Internet: lew@bnr.ca                 Corwan: lewis@bnrmtl

Implementing standards is like walking on water -- both work best when frozen.
From: stephen@memex.co.uk (Stephen Marley)
Newsgroups: comp.editors
Subject: Re: <CR> in VI macros
Date: 15 Oct 92 10:14:36 GMT
Organization: Memex Information Systems Ltd., East Kilbride, Scotland
X-Newsreader: Tin 1.1 PL4

mschee@bcarh600.bnr.ca (Michael SamChee) writes:
: Hi,
: 
: I'm having problems in incorporating a carriage return in a vi
: macro to make the carriage return do what I want :-(.
: 
: I'm wondering if someone out there might have come across a
: similar problem.
: 
: The following example illustrates what I mean:
: 
: Example
: -------
: - first, edit a file: "vi file1"
: - then from within file1, edit another file: ":!vi file2"  
: 
: Problem
: -------
: Write a macro that would "pop" the user from file2 back to file1
: in *one* keystroke.
: 
: If you were *not* using a macro, you would have to type ":q"
: after which you would get a message "[Hit return to continue]",
: then only when you hit carriage return, it puts you back into file1. 
: This is 2 keystrokes. This might sound like a trivial problem,
: but I'm working on a vi tool which will be used by many people,
: and it would be so much nicer if all they had to do was hit one key..
: 
: Michael.

Michael,

These macros work:

map ^A mzywopI:!exec vi -t ^["zdd`z@z 
map ^K :q!

You may recognize them from my original posting on ctags. The non-obvious bit
of magic is the <space> character at the end of the Ctrl-A macro; without it you
do need to type <return> after Ctrl-K. ( Any explanations are welcome !)

The only snag is that vi beeps at you and, if you're using an xterm, 
when you quit back to the shell, the display gets mucked-up with lots 
of "Press return to continue"'s.

Below is uuencoded text for the above using the real control chars: 

--snip-----snip---
begin 644 .exrc
M;6%P( $@;7IY=V\;<$DZ(65X96,@=FD@+70@&R)Z9&1@>D!Z( IM87 @"R Z
$<2$-"@$@
 
end
--snip----snip---

I used to use these macros to good effect but I have since learned how
to use the tags feature properly (if tagstack is implemented, check :se all)...

Type ^] on identifier and ^T to pop back

This doesn't fork another process and all your buffers remain intact.
It's still no good if you wan't case insensitivity.

You should beware that using '!vi -t identifier' etc is quite dodgy if you
intend to actually change the files you're vi-ing. 

Eg.  Imagine you make a change to a file and then tag to another routine 
*within the same file*. After saving it with :w you pop back (^K)  and find
that your first change has been overwritten. 

Also a one stroke macro for :q! is pretty dangerous in itself unless you use
autowrite.

(remember :q won't work because of the command editing in the first macro).

This didn't bother me as I only used these macros for browsing.

Hope this helps...
__
Stephen Marley
Memex Information Systems Ltd., East Kilbride, G75 0YN, Scotland, UK. 
stephen@memex.co.uk	  Tel: (03552) 33804     Fax: (03552) 39676
-- 
Stephen Marley
Memex Information Systems Ltd., East Kilbride, G75 0YN, Scotland, UK. 
stephen@memex.co.uk	  Tel: (03552) 33804     Fax: (03552) 39676
Newsgroups: comp.editors
From: daniel@osefs1.ssd.lmsc.lockheed.com (Daniel Sedergren 7820)
Subject: SAGE Professional Editor
Summary: Seeking Information
Keywords: SAGE editor
Organization: Operational Support Engineering 78-20
Date: Tue, 13 Oct 92 22:34:06 GMT

I am seeking information on a product called SAGE Professional Editor.  Who 
is the developer?  Where is it available?  What does it cost?

I have an applications program that was developed to run under SAGE and need 
to know where to go to get it, and what it's liable to cost.

Any assistance from readers of this newsgroup would be greatly appreciated.  
Please e-mail your reply's.

Thank You


Dan Sedergren                       When you do more than your fair share   
amaziah@cup.portal.com              of the work, you will be given more     
DANIEL@osefs1.ssd.lmsc.lockheed.com than your fair share of the work to do. 

DISCLAIMER: I know they're not much, but they're all mine.
Newsgroups: comp.editors
From: mschee@bcarh600.bnr.ca (Michael SamChee)
Subject: Re: <CR> in VI macros
Keywords: vi, macros, carriage returns
Organization: Bell-Northern Research, Ottawa, Canada
Date: Wed, 7 Oct 1992 16:40:16 GMT

In article <gx12H!z0#9@atlantis.psu.edu>, barr@pop.psu.edu (David Barr) writes:
> In article <1992Oct6.213438.11555@bnr.ca> mschee@bcarh600.bnr.ca (Michael SamChee) writes:
> >Example
> >-------
> >- first, edit a file: "vi file1"
> >- then from within file1, edit another file: ":!vi file2"  
> >
> >Problem
> >-------
> >Write a macro that would "pop" the user from file2 back to file1
> >in *one* keystroke.
> 
> It's already there.  ^^.
> 
> (ctrl-^, depending on the teriminal this is ctrl-6, or ctrl+shift-6)

Yes, this works for the example I gave above.
However, as I stated in my (new) previous posting,
I really want to do ":!vi -t identifier" instead.
In this case, cntrl-6 does not work.

Michael.
From: jeffc@eng.hou.compaq.com (Jeff Carlson)
Newsgroups: comp.editors
Subject: pointer to vi archives wanted
Date: 7 Oct 92 16:48:37 GMT
Article-I.D.: gadget.JEFFC.92Oct7114837
Distribution: usa
Organization: Compaq Computer Corporation

hi,

Could someone email the ftp site and location of the vi archives to
me?  I have to use ftpmail to retreive files which makes searching for
things quite a chore.

Thanks,
Jeff C.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| jeffc@gadget.eng.hou.compaq.com |  "Duct tape is like The Force. It has |
| Compaq Computer Corporation     |  a light side and a dark side, and it |
| Houston, TX  (713) 374-9141     |  holds the universe together."        |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Newsgroups: comp.editors
From: jwang@m.cs.uiuc.edu (Jane Wang)
Subject: VI for Mac?
Summary: Vi for Mac
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Date: Fri, 9 Oct 1992 01:07:53 GMT

vi for Mac?
I know, this sounds pretty strange.  But, I really enjoy using vi.  I just
bought an Apple Powerbook 145; and I have been using MS Word.  I don't
really like it too much.  I have been looking around, but couldn't find any
vi editor running on Mac.  So, what I did instead is to install a SoftPC
and run the PC version of vi.  Does anyone know if there is a vi editor
for Mac??

Thank you so so much.

JW
From: nickp@BNR.CA ("Nick  Pitfield", N.T.)
Newsgroups: comp.editors
Subject: Re> Vi help needed
Date: 16 Oct 92 16:57:04 GMT

> From: jim@n5ial.chi.il.us (Jim Graham)
>
>first off, *PLEASE* insert a CR every now and then....as in, before you
>reach 80 columns, as opposed to 360 or so, like the SINGLE LINE I'm
>quoting below....  thanks.  if not, please use fmt to do it for you.

I suggest YOU check YOUR news software, as my original text left here at
under 80 chars/line - and I know for a fact that it didn't get managled by
our software....

>I won't ask why you would want to prevent users from shelling out, but
>I realize that there are some companies (I used to work for one) who are
>really paranoid about these things, so I won't touch that one.....

We're not paranoid....but perhaps I should explain further....

We've installed this system at a major customer site. The customer's user
accounts use a customized login script that allows them to start certain
tools for using our application. It is these users that are not supposed
to have shell access.

Proper users such as root and a few (non-root) admin accounts have normal
shell access - these accounts are not accessible to the customer.

>but I do have an idea for you.  it's very simple, really.  you simply
>execute the following commands:
>   % su
>   # cd /bin
>   # rm -f sh csh ksh tcsh [any other shells]
>
>this way, nobody can have shell access on your system, which I assume is
>what you want.  be sure not to remove the BBS program (I'm assuming this
>is for a UNIX-based BBS system).  oh, you might want to leave /bin/sh
>for root, so you might want to do this instead:
>
>  % su
>  # cd /bin
>  # rm -f csh ksh tcsh [any other shells]
>  # chown root sh
>  # chmod 700 sh

As I see no smilies, I'll assume you're actually serious....

As I've said, non-customer accounts use normal login shells (either ksh or
sh), so deleting all the shells is a non-starter. I'm not sure many people
would consider this a good idea anyway - many system utilities use these
shells; you delete these and you're up shits creek.

BBS = Bulletin Board System ????

Unfortunately I work in the real world, and our application is a real-time
commercial system processing millions of pounds worth of data; not a meeting
point for the exchange of virus-infested games or wank-pix used by retarded
teenagers with no lives to live.
Newsgroups: comp.editors
From: frechett@spot.Colorado.EDU (-=Runaway Daemon=-)
Subject: Re: damn tabs
Organization: University of Colorado, Boulder
Date: Wed, 7 Oct 1992 21:42:49 GMT

In article <1992Oct7.032729.19960@seas.smu.edu> rrb@seas.smu.edu (Robert R. Bailey) writes:
>I use a macro to expand tabs.  I use it frequently.
>
>:map T :%s/^I/    /g
>
WHat would happen if I had a file with
a	b    
aa	b
aaa	b
aaaa	b
aaaaa	b
aaaaaa	b
aaaaaaa	b
Between the last 'a' and the 'b' is a tab in every case.. Methinks
your macro will make a mess.. to state it mildly.

Or is there something particularly clever we're all missing?


	ian
Newsgroups: comp.editors
From: tma@encore.com (Thanh Ma)
Subject: turn off the cursor
Organization: Encore Computer Corporation
Date: Thu, 8 Oct 1992 20:47:17 GMT
Summary: how to turn off the cursor
Keywords: cursor, editor

A while ago there was some discussions about how to turn off the cursor
that I did not pay attention to. Now I have a need to to it. Would
someone kindly send me information about this.

Thanks a lot.