HDTenEightyP/NetNews huggingface dataset:
From: shrchin@csug.cs.reading.ac.uk (Jonathan H. N. Chin)
Newsgroups: comp.editors
Subject: Re: vi options
Date: 2 Oct 92 19:42:48 GMT
Organization: University of Reading

bt@irfu.se (Bo Thide') writes:
>In article <1992Sep30.221957.6250@infonode.ingr.com> "Vilva Natarajan <vilva@madras.b23b.ingr.COM>" writes:
>>    From inside vi, a ":r!<cmd>" reads in the output of the
>>    shell command into the file. Is there a way to do this
>>    on the command line? I tried the -c option as follows
>>	
>>	vi -c ":r\!pwd" test
>>
>>    but the command output never shows up in the file.
>>    Any help would be appreciated.

>Say you want to enter the date on a line by using the UNIX date(1)
>command.  Then, move to the line where you want the date.  There, in vi
>command mode enter "!!date".  That's it.  the duble bang (!!) is
>analogous to "dd" and "cc" etc, i.e., it means act on the whole line.

Methinks the answer to Vilva(?)'s question is that his version of vi is
(dare I say it?) broken. Assuming he is in a csh when entering the quoted
commandline, he *should* end up with a line at the bottom of his file that
contains the name of the current directory.
Just possibly, his vi is getting confused by the ":" which is not
required. Another possible answer is that the file "test" does not
exist. If this is the case, vi will report this, and not bother processing
the command.
Yet another possibility is that *my* vi is broken and Vilva's is doing
what it should: ignoring an invalid command. Consider that Bill Joy
states in the ex reference manual:

    ( . ) read  !command
 
         Reads the output of the command command into the buffer
         after  the  specified line.  This is not a variant form
         of the command, rather  a  read  specifying  a  command
         rather  than a filename; a blank or tab before the ! is
         mandatory.

I missed Vilva's original post, so I can only comment on what I saw in
Bo's post. Hope it is of some help.

Jonathan

-- 
Jonathan H N Chin, 8 kyu \ Dept. of Cybernetics, \ "Respondeo, etsi mutabor"
                          \ University of Reading \
shrchin@uk.ac.rdg.susssys1 \ Box 225, Whiteknights \ < Rosenstock-Huessy >
bq305@cleveland.freenet.edu \ Reading, RG6 2AY, U K \
Newsgroups: comp.editors
From: lwv26@cas.org (Larry W. Virden)
Subject: Re: ViX -- vi for x???
Followup-To: comp.editors
Reply-To: lvirden@cas.org (Larry W. Virden)
Organization: Nedriv Software and Shoe Shiners, Uninc.
Date: Tue, 6 Oct 1992 11:38:32 GMT

In article <1992Oct04.205154.18715@NeoSoft.com> rohit@NeoSoft.com (Rohit Mehrotra) writes:
:In article <tlukka.718221154@vipunen.hut.fi> tlukka@vipunen.hut.fi (Tuomas Lukka) writes:
:>I've been thinking of making a vi-compatible X editor for some time now and
:>would like to have other peoples' opinion about taking up such a project:
:>  First of all: has anything like this been done?
:>    i.e. am I reinventing the wheel here?


:>Please reply by email, and tell me if I'm wasting my time or making a
:>well-niched effort here.
:>
:>Of course, the editor will be publicly available, NOT however in public
:>domain.. something like the copyleft, maybe, will have to see about that
:>in due time.
:
:CRISP3.0+ the X version has a VI emulation. It lets one emulate VI in an X
:environment and has all the features that you mentioned above, i.e. multiple

:Rohit Mehrotra


Well- not, it doesn't have ONE of the features mentioned about - the fact
that Tuomas Lukka mentioned that the editor would be publicly available but
not public domain.  Assuming (always a dangerous thing) that what is meant
is that folks will be free to give the source to whomever they wish at no
charge, and those folk have no requirement to pay for it, that is a VERY
valuable feature.

-- 
Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
America Online: lvirden@aol.com
Newsgroups: comp.editors
From: frechett@spot.Colorado.EDU (-=Runaway Daemon=-)
Subject: Re: Paragraphs and vi
Organization: University of Colorado, Boulder
Date: Mon, 5 Oct 1992 21:27:39 GMT

In article <1992Oct4.021632.6199@ils.nwu.edu> eric@ils.nwu.edu (Eric Goldstein) writes:
>Hi! 
>
>I'm looking for a way to automatically format paragraphs using vi.
This is what I use.
map ^W 80^V|lF a^M^[
map ^X j0lkJ^W

I'd go to the top of your example and hit ^X until I was done with the
paragraph.  The ^W is a separate mapping so that you can break long lines.
^X combines lines and then tries to break them into 80 column chunks.
^W just breaks long lines into 80 column chunks.  Give it a shot.

	ian
Newsgroups: comp.editors
From: rnelson@ocelot.csc.wsu.edu (Roger Nelson)
Subject: REDT VT100 cursor keys
Reply-To: rnelson@ocelot.csc.wsu.edu.UUCP ()
Organization: Washington State University
Date: Sun, 27 Sep 92 01:29:51 GMT

Several people have experience a problem with the VT100 command
key binding file in versions 2.0 and higher of REDT.

Here is the fix:

There is an invalid combination of escape sequences in the VT100.key file.


If you edit the VT100.key file and see at about line 113 the definition:

    ^[[  GOTO_BOL  Esc [ (All) 

followed by four cursor key definitions for the DEC 5100, then delete 
either the GOTO_BOL line or the four DEC 5100 cursor key definition lines
(preferably  delete the 5100 cursor key definitions unless you are
using one of the DEC workstations).  

Roger
From: bill@Celestial.COM (Bill Campbell)
Newsgroups: comp.editors
Subject: Re: Overstrike mode in vi. Is there a way?
Date: 26 Sep 92 16:37:13 GMT
Organization: Celestial Software, Mercer Island, WA

In <1992Sep25.153244.3116@fs7.ece.cmu.edu> sutton@dart.ece.cmu.edu (Peter Sutton) writes:


:In article <1992Sep25.061224.14545@ucsu.Colorado.EDU>, frechett@spot.Colorado.EDU (-=Runaway Daemon=-) writes:
:|>Ok, I can do overstrike mode in Emacs, tpu, any word processor, and a couple
:|>other editors.  Can anyone think of a clever way to do overstrike mode
:|>in vi without knowing how many characters I need to type over to 
:|>begin with?  An example would be to have an ascii border drawn around
:|>the edge of the screen filled in with just spaces.  If I wanted to 
:|>enter something in the center of the screen in the equivalent of
:|>overstrike mode.... is there a way to do it?

:Simple: use 'R' (replace characters)

Or R as in R(ead the manual :-).

Bill
-- 
INTERNET:  bill@Celestial.COM   Bill Campbell; Celestial Software
UUCP:   ...!thebes!camco!bill   6641 East Mercer Way
             uunet!camco!bill   Mercer Island, WA 98040; (206) 947-5591
SPEED COSTS MONEY -- HOW FAST DO YOU WANT TO GO?
Newsgroups: comp.editors
From: mschee@bcarh600.bnr.ca (Michael SamChee)
Subject: <CR> in VI macros
Keywords: vi, macros, carriage returns
Organization: Bell-Northern Research, Ottawa, Canada
Date: Tue, 6 Oct 1992 21:34:38 GMT

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.
Newsgroups: comp.editors
From: nh@cbnewsg.cb.att.com (nicholas.hounsome)
Subject: Re: Paragraphs and vi
Organization: AT&T
Date: Mon, 5 Oct 1992 07:54:55 GMT

From article <1992Oct4.050951.2469@ils.nwu.edu>, by eric@ils.nwu.edu (Eric Goldstein):
> I've gotten several helpful replies to my query.  Thanks!!!
> 
> The advice in each case was to use the Unix fmt command.
> In vi, fmt can be invoked for the paragraph in question by
> using the !}fmt command.
> 
> In my case, this just about works (but not quite).  The 
> paragraph does get formated, but the system then inserts
> a message directly into my text.  Using the example I gave
> earlier:
> ------------------------------------------------------------------
> stty: TCGETS: Operation not supported on socket
> This is a sample sentence.  This is sample sentence number two, which
> is longer than the others.  This is sample sentence number three.  This
> is sample sentence number four.
> ------------------------------------------------------------------
>  
> This isn't too bad -- I can always just delete out the line....
> ...but naturally, I wonder if there is a better way to do it.  I'm using
> SunOS Release 4.1.2, and I'm woefully ignorant of Unix tricks.  And
> the fmt command sure was a cool thing to find out about!
> 
>        Thanks!   
>          -- Eric
> 
> -- 
> 

I have never had this problem but a quick fix might be to wrap fmt in a 
shell script and dump stderr to /dev/null since I assume that
the error message is written to stderr.

eg.

#!/bin/sh
fmt "$@" 2>/dev/null
From: cassidy@cps.msu.edu (John J Cassidy)
Newsgroups: comp.editors
Subject: vi help
Date: 1 Oct 92 20:03:27 GMT
Reply-To: cassidy@cps.msu.edu (John J Cassidy)
Organization: Dept. of Computer Science, Michigan State University
Originator: cassidy@nuthatch.cps.msu.edu


	Can someone help me?  I've been using vi now for
about a year.  Some of the problems with vi escape me, and
I saw that you have this newsgroup here.  

	Is there any way in vi to read in an additional
file to the one you are working on?

	Also linefeeds kind of bug me, is there a way
to append the line following onto the end of the current 
line?  In other words, delete the line feed/carraige 
return.

	Oh yes, and you can tell me I should have read`
the manual, but I have read the manual on our system, and
it simply does not cover inside commands, only command-line
ones.


	John J Cassidy		cassidy@cps.msu.edu
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Newsgroups: comp.editors
From: sridhar@enuxhb.eas.asu.edu (Sridhar Venkataraman)
Subject: Re: Toggle between current and prev. positions in VI
Organization: Arizona State University, Tempe AZ
Distribution: na
Date: Sat, 26 Sep 1992 20:36:57 GMT

sarma@rtsg.mot.com (Raja Sarma)
writes on comp.editors:

)Hi All,
)	Is it possible to toggle between two positions in VI ?
)Let me explain a bit. Say, I am on line 100 and I went to a 
)particular line XX, backwards or forwards, can I go back to 
)line 100 (after an action/no-action at XX) in one key stroke
)(say <ctrl><char> etc., ...) ?

I assume vi does equivalent of an m' (which is ideally line 1 unless a
+line is given on command line in which case '' simply beeps) when it
starts up on a file. You could redefine ' position using m' or just
assign your own mark using a-z and going to it using m[a-z]. Still
interesting is the ` (backquote). Try it until you understand what
each does. ' is for line positions and ` is for character positions.

)	Is it also possible to goto many different lines
)in the file backwards and forwards and still be able to 
)go back to line 100. 

Yes. Try looking into the definitions of ' and ` in any decent vi
manual/book.

)-- Raja

Sridhar.
From: asrael@I1.informatik.rwth-aachen.de
Newsgroups: comp.editors
Subject: Just a test (please ignore)
Date: 28 Sep 92 18:07:49 GMT

Just a test!
Please ignore!
From: rrb@seas.smu.edu (Robert R. Bailey)
Newsgroups: comp.editors
Subject: Re: damn tabs
Date: 7 Oct 92 03:27:29 GMT
Organization: School of Engineering and applied science; S.M.U.; Dallas, Tx

In article <1992Oct6.040531.25139@cronkite.ocis.temple.edu> ray@astro.ocis.temple.edu (Ray Lauff) writes:
>   I hate the way vi places tabs in the file instead of spaces.
>   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?

I use a macro to expand tabs.  I use it frequently.

:map T :%s/^I/    /g

where ^I represents the tab key, and as many spaces between the second pair
of /'s as desired.  This works faster than forking a shell to invoke expand.
I also map some of the function keys such as

:map #2 !}fmt
-- 
From: Bob Bailey = rrb@seas.smu.edu
Newsgroups: comp.editors
From: sarma@rtsg.mot.com (Raja Sarma)
Subject: Toggle between current and prev. positions in VI
Organization: Motorola Inc., Cellular Infrastructure Group
Distribution: na
Date: Sat, 26 Sep 1992 15:54:32 GMT

Hi All,
	Is it possible to toggle between two positions in VI ?
Let me explain a bit. Say, I am on line 100 and I went to a 
particular line XX, backwards or forwards, can I go back to 
line 100 (after an action/no-action at XX) in one key stroke
(say <ctrl><char> etc., ...) ?

	Is it also possible to goto many different lines
in the file backwards and forwards and still be able to 
go back to line 100. 

Thanks in advance

-- Raja

++++++++++++++++++++++++++++++++++++
+ Raja Sarma 					+
+ E-mail: sarma@maize.rtsg.mot.com +
++++++++++++++++++++++++++++++++++++
From: shrchin@csug.cs.reading.ac.uk (Jonathan H. N. Chin)
Newsgroups: comp.editors
Subject: Re: UNIX COMMAND IN VI SESSION.
Date: 2 Oct 92 08:29:38 GMT
Organization: University of Reading

hamjavar@carina.unm.edu (Farid Hamjavar) asked:

>VI allows you to execute UNIX commands in a VI session.
>How can I enter AT THE CURSER, the output of the  UNIX's  "date" command ?

If you want the cursor to end up in the same place as it started:

mao^[!!date^M"ad$`aPjdd`a

where ^[ is the ESC key and ^M is the RETURN key. Alternatively to get the
cursor to finish _after_ the inserted text:

i^M^Mx^[k!!date^MkJxJxx

Again ^[ is ESC and ^M is RETURN. The first and last x are not needed but ensure
that no spaces are either added or deleted.

Note that there are numerous other ways to do this operation. If you don't plan
on using the above inside a macro, you can omit the named buffers from the first
example, making it the same number of keystrokes as the second example. Or you can
omit various bits if you don't care where the cursor ends up, etc.

Jonathan
-- 
Jonathan H N Chin, 8 kyu \ Dept. of Cybernetics, \ "Respondeo, etsi mutabor"
                          \ University of Reading \
shrchin@uk.ac.rdg.susssys1 \ Box 225, Whiteknights \ < Rosenstock-Huessy >
bq305@cleveland.freenet.edu \ Reading, RG6 2AY, U K \
From: duane@intermec.com (Duane Charron)
Newsgroups: comp.editors
Subject: Crisp 1.9 on a Sun using OpenWin
Date: 29 Sep 92 21:33:34 GMT
Reply-To: duane@intermec.com ()
Distribution: world
Organization: Intermec Corporation, Everett, Wa.


  I have gotten Crisp to compile and link on a sun 3/80.  The
macros compile also.   I have the environment variables setup
so that crisp comes up and loads the macro's correctly.  The
problem I have is that none of the function keys work!  I can't
get it to work in Xwindows or in the standard mode.  Is there 
a setup on the sun I must do?  I would like to get this going
so any help would be appreciated.




			Thanks in advance.


			Duane
From: carlj@muppet.bt.co.uk
Newsgroups: comp.editors
Subject: Re: vi help
Date: 2 Oct 92 08:40:40 GMT
Reply-To: carlj@muppet.bt.co.uk
Organization: British Telecom

In article 19080@msuinfo.cl.msu.edu, cassidy@cps.msu.edu (John J Cassidy) writes:
=
=	Can someone help me?  I've been using vi now for

Ohhhh yes!

=about a year.  Some of the problems with vi escape me, and
=I saw that you have this newsgroup here.  

Well not me personally....

=
=	Is there any way in vi to read in an additional
=file to the one you are working on?

Hit escape, then type...
	:r filename <carriage-return>

=
=	Also linefeeds kind of bug me, is there a way

Been there...

=to append the line following onto the end of the current 
=line?  In other words, delete the line feed/carraige 
=return.

Hit escape, then type...
		J

thats a capital J

=
=	Oh yes, and you can tell me I should have read`
=the manual, but I have read the manual on our system, and
=it simply does not cover inside commands, only command-line
=ones.

Yeah, this seems to be a common failing, however if you wait
a bit, a nice fellow named Ove will post a message about an ftp site
where you can get lots of nice documentation.

Cheers,
C

ps My apologies, feeling a bit hungover, tends to make me post
in a rather silly manner B^}
Newsgroups: comp.editors
From: rahardj@ccu.umanitoba.ca (Budi Rahardjo)
Subject: Re: UNIX COMMAND IN VI SESSION.
Organization: University of Manitoba, Winnipeg, Canada
Date: Fri, 2 Oct 1992 20:10:34 GMT

In <=1=p9lb@lynx.unm.edu> hamjavar@carina.unm.edu (Farid Hamjavar) writes:
>VI allows you to execute UNIX commands in a VI session.
>How can I enter AT THE CURSER, the output of the  UNIX's  "date" command ?

Try

:.!date

-- budi
-- 
Budi Rahardjo <rahardj@ccu.umanitoba.ca>
Unix Support - Computer Services - University of Manitoba
From: jxh@math.ksu.edu (James C. Hu)
Newsgroups: comp.editors
Subject: Re: Vi Formating without using fmt
Date: 4 Oct 1992 14:21:10 -0500
Organization: Dept. of Mathematics, Kansas State University
Distribution: inet
NNTP-Posting-Host: hilbert.math.ksu.edu

rliles@spuds.mlb.semi.harris.com (Ray Liles) writes:

>I hate to take up bandwidth with what appears to be obvious to veteran vi
>users, but I can't seem to find *formating* documentation in any books.
>Directions to FAQs/sites would be appreciated.

>1. How do you insert text into an existing paragraph AND reformat/fill that
>   paragraph so that all text observes the wrapmargin, without part of a word
>   on one line and the rest of the word on the next?
>2. How do you justify text for both the left AND right margins without running
>   through fmt?

Certainly, there are editors with this capability, and VI is even one
of them, but not without calling external programs to reformat the
current line.  Also, it requres remapping keys and defining macros to
make these calls.  While this makes it transparent to the user of VI
that external calls are being made, they are still there.
Additionally, I don't like remapping what the RETURN key does, since I
would feel like I would lose control over how the editor behaves.

-- 
James C. Hu (jxh@math.ksu.edu), 1804 Denholm Dr., Manhattan, KS 66502
I speak for me, the whole me, and nothing but for me.  So help me me.
Newsgroups: comp.editors
From: fdd@GTO.epg.harris.com (F. David Duncan)
Subject: Re: vi help
Date: Fri, 2 Oct 1992 17:43:49 GMT
Reply-To: fdd@epg.harris.com (F. David Duncan)
Organization: Engineering Productivity Group, Harris Corp., Melbourne, FL
Summary: yet another power bang 

In article <1992Oct02.132902.16591@sherpa.uucp> rac@sherpa.uucp (Roger Cornelius) writes:
>In article <1992Oct1.200327.19080@msuinfo.cl.msu.edu>, cassidy@cps.msu.edu (John J Cassidy) writes:
>> 
>> 	Also linefeeds kind of bug me, is there a way
>> line?  In other words, delete the line feed/carraige 
>> return.
>
>Use J on the line you want to join to.
    
or use :j to leave an EOF between the lines, just as J in action mode 

Use :j! to perserve exact spacing
From: wakew@jingluo.cs.vt.edu (William Wake)
Newsgroups: comp.editors
Subject: Re: PEN Editor
Keywords: PEN  WE
Date: 1 Oct 92 14:28:35 GMT

In article <1992Sep30.230121.15170@point.uucp> wek@point.uucp (Bill Kuykendall)  
writes:
> 
:
> 
> I have two requests.  The first is for a general procedure to follow in the
> future for such cases.  The second is for any information about the names
> PEN and WE.  Does anyone know of an editor or wordprocessor, commercial or
> otherwise, which uses either of these names? 
(Sorry, email didn't work.)

There exists both a PEN & a WE editor.  Both were/are academic projects.  I  
don't know about the availability of either. 

The PEN editor was documented in an ACM conference on text editing.  (The same  
conference had a paper by Gosling on his screen redisplay algorithm, and one by  
Stallman on EMACS.)
	Design of the PEN video editor display module
	by D. R. Barach, D. H. Taenzer, and R. E. Wells
	In: Text manipulation, proceedings of the ACM SIGPLAN/SIGOA symposium  
(Portland, OR, June 8-10, 1981). ACM, New York, 1981, pp. 132-136.


The WE editor/environment is from UNC (Charlotte, I think).  It stands for  
"Writing Environment" and is a writing-theory based approach to a hypertext  
editing environment.  It was documented in one of the ACM Hypertext  
conferences, either '87 or '89.

Regards,
	Bill Wake
	wakew@cs.vt.edu
From: ian@festival.ed.ac.uk (Ian Turton)
Newsgroups: comp.editors
Subject: Re: Overstrike mode in vi. Is there a way?
Date: 29 Sep 92 08:33:49 GMT

#frechett@spot.Colorado.EDU (-=Runaway Daemon=-) writes:
#
#In article <1992Sep26.163713.14508@Celestial.COM> bill@Celestial.COM (Bill Campbell) writes:
#>In <1992Sep25.153244.3116@fs7.ece.cmu.edu> sutton@dart.ece.cmu.edu (Peter Sutton) writes:
#>
#>:Simple: use 'R' (replace characters)
#>
#>Or R as in R(ead the manual :-).
#>
#>Bill
#
#yes. yes.. I realize it was a simple question.  That's not a problem.  However
#unless you have a nonstandard manual, then I'd have to say that YOU have 
#not read the manual.  This command and about 100 more just like it are not
#in TFM.
#
#You want to see what I mean.. Here's a command you might try..
#man vi | grep R
#
	  [.... Lots of R's deleted...]

          Insert and Replace
           rx            Replace single char with x
           Rtext Esc     Replace characters

#
#Funny.. I READ the manual.  Did you?

Well it seems to be in my manual :-)
#
#The basic problem I had was that it wasn't in my handy keymap.  It's 
#ussually got what I'm looking for, but it skipped that one.  It's been
#added.
#
#Thanks to all who replied.
#
#	ian

Cheers 

Ian
--
Ian Turton                                Dept of Geophysics and geology
ian@uk.ac.edinburgh                       JCMB, Kings Buildings
                                          Mayfield Rd, Edinburgh,UK
     ***If you don't like my views sue my boss, he'll love it.***
Newsgroups: comp.editors
From: dattier@ddsw1.mcs.com (DWT)
Subject: Re: vi help
Date: Sat, 3 Oct 1992 16:05:36 GMT
Organization: Contributor Account at ddsw1, Chicago, Illinois  60657

I screwed up in <BvI8KM.25E@ddsw1.mcs.com>:

| cassidy@cps.msu.edu (John J Cassidy) wrote in
| <1992Oct1.200327.19080@msuinfo.cl.msu.edu>:

| | 	Also linefeeds kind of bug me, is there a way
| | to append the line following onto the end of the current 
| | line?  In other words, delete the line feed/carraige 
| | return.

I misread Cassidy's question.  "A" is the right answer for what I first
thought he said, but "J" is the correct answer for what he was really
asking.

nJ will concatenate the current line and the n-1 lines following it,
replacing the newlines with spaces.  n defaults to 2.  If a line ends with a
period, a question mark, or an exclamation point, there might (irregularly
and unpredictably) be two spaces placed between it and what had been the line
after.

Trailing whitespace will be preserved; leading whitespace will be lost.

After a colon or in ex mode, :{startline},{endline}j does the same thing. 
:{startline},{endline}j! will concatenate them with no separators where the
newlines were.  The default range is .,.+1.

David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818