🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

9 total messages Started by rwatson@loki.une Tue, 10 Sep 1991 07:18
improved vi
#4004
Author: rwatson@loki.une
Date: Tue, 10 Sep 1991 07:18
17 lines
697 bytes
I have recently become reaquainted with unix after a 10-year absence. I
note that ed has been "updated" by vi. I am appalled.
This would have been a graet advance in 1978 but not in 1991.

After some thought, I propose a minor (?) change which could GREATLY improve
vi: insert mode should allow the user to position anywhere in the document
by using cursor keys; editing by del key would be possible; any characters
would be inserted at the current location.

Vi hackers: how feasible is this??
--
Richard Watson			Centre for Computing and Mathematics
				University of New England, Northern Rivers
phone:  (066) 203625		P.O. Box 157
e-mail: rwatson@loki.une.oz.au	Lismore NSW 2480 AUSTRALIA

Re: improved vi
#4014
Author: lshaw@ccwf.cc.ut
Date: Tue, 10 Sep 1991 19:37
29 lines
1366 bytes
In article <1719@loki.une.oz.au> rwatson@loki.une.oz.au (Watson Richard) writes:
>After some thought, I propose a minor (?) change which could GREATLY improve
>vi: insert mode should allow the user to position anywhere in the document
>by using cursor keys; editing by del key would be possible; any characters
>would be inserted at the current location.

As for arrow keys, I can tell you that I've seen it done.  I don't know
how, though - I never thought about looking.  This was on HP-ux, around
version 7.  (They might have just hacked at the vi sources - who knows).

I'm not sure what you mean by 'editing by del key' or 'any characters
would be inserted at the current location.'

>Richard Watson			Centre for Computing and Mathematics
>				University of New England, Northern Rivers
>e-mail: rwatson@loki.une.oz.au	Lismore NSW 2480 AUSTRALIA

They have a New England in Australia too?  I thought American was the only
one.  I guess that it's not surprising that "New England" would have been a
popular name among British colonists...

Later,
   Logan
--
____________________________________________________________________________
"Surely every man walks about like a phantom; surely they make an uproar for
 nothing; he amasses riches, and does not know who will gather them.  And
 now Lord, for what do I wait?  My hope is in Thee."  - Psalms 39:6-7

Re: improved vi
#4020
Author: s902113@minyos.x
Date: Wed, 11 Sep 1991 02:12
64 lines
2231 bytes
rwatson@loki.une.oz.au (Watson Richard) writes:


>I have recently become reaquainted with unix after a 10-year absence. I
>note that ed has been "updated" by vi. I am appalled.
>This would have been a graet advance in 1978 but not in 1991.

>After some thought, I propose a minor (?) change which could GREATLY improve
>vi: insert mode should allow the user to position anywhere in the document
>by using cursor keys; editing by del key would be possible; any characters
>would be inserted at the current location.

>Vi hackers: how feasible is this??


1. moving insertion point with cursor keys in vi's insert mode:

you need the following maps, in your .exrc or whatever...
:map! ^Vleftarrrow ^VESCi
:map! ^Vrightarrow ^VESClli
:map! ^Vdownarrow ^VESClji
:map! ^Vuparrow ^VESClki

Where *arrow is the appropriate arrow key (in VT100 codes it will look
something like:^[OB for downarrow, etc.), and ESC is the escape key.

You need the ^V (written here as '^' 'V', but entered as ctrl-v to
literally insert the codes on the command line. Spaces ARE significant
here...


2. editing the del key to work.

Well, I assume you mean the del key to delete the current character
(at the cursor), as opposed to the backspace key which delete the
previous character.  Try this:

:map! ^VDEL ^VESClxi

where DEL is your delete key...


3. any characters would be inserted at the current location.

Can't seem to follow what you want to do here...



Not to start a flame war here, but editors like vi and emacs are good
because they allow you to map just about anything to any key you like.
(VI can't map all keys tho....), unlike alot of editors on micros such
as PC's which often only have a wordstar (yech!) layout.

>--
>Richard Watson			Centre for Computing and Mathematics
>				University of New England, Northern Rivers
>phone:  (066) 203625		P.O. Box 157
>e-mail: rwatson@loki.une.oz.au	Lismore NSW 2480 AUSTRALIA
--
____________________________________________________________________________
| Luke Mewburn [Zak]                | #disclaimer: I _own_ these opinions, |
| s902113@minyos.xx.rmit.oz.au      |      No-one else deserves them  :-)  |
----------------------------------------------------------------------------

Re: improved vi
#4022
Author: s887212@minyos.x
Date: Wed, 11 Sep 1991 10:05
35 lines
1427 bytes
s902113@minyos.xx.rmit.oz.au (Luke Mewburn) writes:

>1. moving insertion point with cursor keys in vi's insert mode:

>you need the following maps, in your .exrc or whatever...
>:map! ^Vleftarrrow ^VESCi
>:map! ^Vrightarrow ^VESClli
>:map! ^Vdownarrow ^VESClji
>:map! ^Vuparrow ^VESClki

nice try but wierd things will happen on:
a: empty lines
b: at the end of a line

>3. any characters would be inserted at the current location.

>Can't seem to follow what you want to do here...

This is like the default mode for NOS's fse ( full screen editor, how
imaginative ). Basically its like the 'R' mode in vi, where what you
type just types over any existing characters, as opposed to an insert
mode where what you type appears in front of any existing characters.

This can be a nice feature, and it was hard for me to get used to not
having that feature when I first swapped to vi. Now however, I live
quite happily without it, and I will even go further and say that I
would not use it any more ( except under extreme cases like editing
tables, which I rarely do anyway :-)

======================================================================
Stephen Riehm [Romulis]                               smr@bkxmel.oz.au
Phone:  +61 3 525 2677                          Fax:    +61 3 521 3105
     "Never assume, you will only make an ASS out of U and ME !"
== Disclaimer: I claim no responsibility for my employer's actions. ==

Re: improved vi
#4026
Author: ruba@molbio.ethz
Date: Wed, 11 Sep 1991 19:16
27 lines
1023 bytes
rwatson@loki.une.oz.au (Watson Richard) writes:


>I have recently become reaquainted with unix after a 10-year absence. I
>note that ed has been "updated" by vi. I am appalled.
>This would have been a graet advance in 1978 but not in 1991.

>After some thought, I propose a minor (?) change which could GREATLY improve
>vi: insert mode should allow the user to position anywhere in the document
this one is easy - it only needs the following in your .exrc:

map! ^[OA ^[ka
map! ^[OB ^[ja
map! ^[OD ^[ha
map! ^[OC ^[la

(use ctrl-[ !)
>by using cursor keys; editing by del key would be possible; any characters
>would be inserted at the current location.
editing with the delete key is not possible this way.
	Ruedi
--
Rudolf E. Baumann                                    ruba@molbio.ethz.ch
Institut fuer Molekularbiologie & Biophysik          MOLEKULA@CZHETH5A.bitnet
ETH Hoenggerberg (HPM G6)                            Tel. ++41 1 377 33 97
CH-8093 Zuerich/Switzerland                          Fax  ++41 1 371 48 73

Re: improved vi
#4027
Author: bible@iastate.ed
Date: Wed, 11 Sep 1991 21:30
32 lines
1360 bytes
In article <56947@ut-emx.uucp> lshaw@ccwf.cc.utexas.edu (Logan Shaw) writes:
>In article <1719@loki.une.oz.au> rwatson@loki.une.oz.au (Watson Richard) writes:
>>After some thought, I propose a minor (?) change which could GREATLY improve
>>vi: insert mode should allow the user to position anywhere in the document
>>by using cursor keys; editing by del key would be possible; any characters
>>would be inserted at the current location.
>
>As for arrow keys, I can tell you that I've seen it done.  I don't know
>how, though - I never thought about looking.  This was on HP-ux, around
>version 7.  (They might have just hacked at the vi sources - who knows).
>
[other remarks deleted]

	I am told the following key mappings will let you move around with
the arrow keys in input mode.  I have not tried them yet, but I trust the
source.

tony
=============================================================================

Key_mappings:

  Four "map!" commands will allow you to use the arrow keys in
  text-insertion mode as well as command mode.  The list below shows
  the commands as you would type them when you create or edit your
  ~/.exrc file using vi.

       map! <ctrl-v><left-arrow> <ctrl-v><Esc> i
       map! <ctrl-v><down-arrow> <ctrl-v><Esc> ja
       map! <ctrl-v><up-arrow> <ctrl-v><Esc> ka
       map! <ctrl-v><right-arrow> <ctrl-v><Esc> la

Re: improved vi
#4031
Author: lshaw@ccwf.cc.ut
Date: Thu, 12 Sep 1991 05:55
30 lines
1235 bytes
In article <1991Sep11.213011.19762@news.iastate.edu> bible@iastate.edu (Anthony E Bible) writes:
>  Four "map!" commands will allow you to use the arrow keys in
>  text-insertion mode as well as command mode.  The list below shows
>  the commands as you would type them when you create or edit your
>  ~/.exrc file using vi.
>
>       map! <ctrl-v><left-arrow> <ctrl-v><Esc> i
>       map! <ctrl-v><down-arrow> <ctrl-v><Esc> ja
>       map! <ctrl-v><up-arrow> <ctrl-v><Esc> ka
>       map! <ctrl-v><right-arrow> <ctrl-v><Esc> la

This didn't work out so well for me in command mode.  So, I added the
following to my ~/.exrc (note there's no "!" after the "map".):

map <ctrl-v><left-arrow> h
map <ctrl-v><down-arrow> j
map <ctrl-v><up-arrow> k
map <ctrl-v><right-arrow> l

Now, things work just peachy keen, in both typing (insert) mode and beeping
(command) mode, even at the ends and beginning of lines and stuff.

Later,
  Logan
--
____________________________________________________________________________
"Surely every man walks about like a phantom; surely they make an uproar for
 nothing; he amasses riches, and does not know who will gather them.  And
 now Lord, for what do I wait?  My hope is in Thee."  - Psalms 39:6-7

Re: improved vi
#4032
Author: ctwomey@ccvax.uc
Date: Thu, 12 Sep 1991 10:37
51 lines
1796 bytes
In article <1719@loki.une.oz.au>, rwatson@loki.une.oz.au (Watson Richard)
writes:
>
> I have recently become reaquainted with unix after a 10-year absence. I
> note that ed has been "updated" by vi. I am appalled.
> This would have been a graet advance in 1978 but not in 1991.
>

vi has been around a long time now - definitely since 1980-ish anyway.
(I vaguely remember a Unix Version 7 which had it?  That would put it
somewhere around 1978.)

> After some thought, I propose a minor (?) change which could GREATLY improve
> vi: insert mode should allow the user to position anywhere in the document
> by using cursor keys; editing by del key would be possible; any characters
> would be inserted at the current location.
>
> Vi hackers: how feasible is this??

I'm not sure what you mean by 'editing by del key', but for the first part of
your suggestion, it is possible using the 'map!' command to set up your cursor
keys in the manner you require.  ('map!' is the equivalent of 'map' in insert
mode.)

 map! ^[0A ^[ka
 map! ^[0B ^[ja
 map! ^[0C ^[lli
 map! ^[0D ^[i

are the commands you require - and can be entered my typing the sequences

map! <space> <ctrl-V> up-arrow    <space> <ctrl-V> <esc> ka
map! <space> <ctrl-V> down-arrow  <space> <ctrl-V> <esc> ja
map! <space> <ctrl-V> left-arrow  <space> <ctrl-V> <esc> i
map! <space> <ctrl-V> right-arrow <space> <ctrl-V> <esc> lli


Better still, put these commands in your '.exrc' file and have them work
for all your vi sessions.
> --
> Richard Watson			Centre for Computing and Mathematics
> 				University of New England, Northern Rivers
> phone:  (066) 203625		P.O. Box 157
> e-mail: rwatson@loki.une.oz.au	Lismore NSW 2480 AUSTRALIA


Colum Twomey,
Computer Centre,
University College Dublin, Ireland.
ctwomey@ccvax.ucd.ie

Re: improved vi
#4044
Author: gwc@root.co.uk (
Date: Fri, 13 Sep 1991 14:12
22 lines
1062 bytes
In <1719@loki.une.oz.au> rwatson@loki.une.oz.au (Watson Richard) writes:

>After some thought, I propose a minor (?) change which could GREATLY improve
>vi: insert mode should allow the user to position anywhere in the document
>by using cursor keys;

In my opinion this would not be an improvement.  In fact I recommend
exactly the opposite: disable the cursor keys completely - they are
evil!  Not being able to use the cursor keys would force users to learn
more efficient cursor movement techniques, thereby increasing their
productivity.  It would also put a stop to the age old problem of
auto-repeated vt100 cursor keys causing insertion of garbage text.

Also, unmapping the cursor keys and any other keys which generate escape
sequences gets rid of that annoying one second wait after you hit ESC.

I have been using vi for eight years.  In that time I have never once
used a cursor key.
--
Geoff Clare <gwc@root.co.uk>  (USA UUCP-only mailers: ...!uunet!root.co.uk!gwc)
UniSoft Limited, London, England.   Tel: +44 71 729 3773   Fax: +44 71 729 3273

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads