The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Will Senn <will.senn@gmail.com>
To: Ralph Corderoy <ralph@inputplus.co.uk>, TUHS <tuhs@tuhs.org>
Subject: [TUHS] Re: diving into vi (nvi) - some observations from a slow learner
Date: Fri, 7 Jun 2024 11:20:35 -0500	[thread overview]
Message-ID: <05302a0e-58b6-450c-8554-4546a409d603@gmail.com> (raw)
In-Reply-To: <20240607154120.08031210F3@orac.inputplus.co.uk>

Thanks for the tips, Ralph. I definitely learned the 6, but put 'em on a 
card with searching. Here's my motion card, including the scrolling 
commands, mark movement and a couple odd balls, to see how my mind works 
:) :

https://decuser.github.io/assets/img/vi/motions-notecard.jpg

On another note, I was reminded in an offline discussion that QED was 
the predecessor to ed - my history of tech always seems to glitch at the 
genesis of Unix. Of course the Unix pioneers didn't say "Let there be 
Unix and so mote it be" even though it may seems so to some of us. A lot 
of intellectual blood, sweat, and tears went into what came before and 
Ken Thompson definitely stood on the shoulders of Lampson, Deutsch, 
Kleene and others to create his masterpiece.

Ritchie's partial history of QED
https://www.bell-labs.com/usr/dmr/www/qed.html

Deutsch & Lampson's work
https://dl.acm.org/doi/pdf/10.1145/363848.363863

Thompson's innovation
https://dl.acm.org/doi/pdf/10.1145/363347.363387

Kleene's indirect contribution (Automata<->Regular Expression)
https://www.logicmatters.net/tyl/booknotes/kleene-metamath/

Later,

Will

On 6/7/24 10:41 AM, Ralph Corderoy wrote:
> Hi Will,
>
>> But, I think I'll stick with nvi a while until I really nail it down.
> Something I used to do was to look at each key on the keyboard and think
> what it would do, e.g. d, D, and ^D.  Most do at least one thing.
>
>> Leftward motions - [[, {, (, 0, ^|_, B, b, h|^H
>> Rightward Movement - l|SP, e, E, w, W, $, ), }, ]]
> You're missing these handy six: f F t T ; ,
>
>> Upward motions - 1G, ^B, H, ^U, -, k | ^P
>> Downward motions - G, ^F, L, ^D, ^M | +, j | ^J | ^N
> There's also keeping the cursor on the same line but moving the window
> over the text: z ^E ^Y
>
>> Off to figure out tags
> Understand the format of the tags file first; built by ctags(1).
> ^] on a word looks it up and goes there.
> Where you were is pushed on to the ‘tagstack’.
> When you wish to exit that rabbit hole, ^T pops the top of the stack and
> goes there which returns you to where you pressed ^].
>
>      $ func='foo bar xyzzy'
>      $ printf "%s: $func"'\n' $func >src
>      $ cat src
>      foo: foo bar xyzzy
>      bar: foo bar xyzzy
>      xyzzy: foo bar xyzzy
>      $ grep -n '[^:]*' src | awk -F: '{print $2 "\tsrc\t" $1}' >tags
>      $ sed -n l tags
>      foo\tsrc\t1$
>      bar\tsrc\t2$
>      xyzzy\tsrc\t3$
>      $
>
> vi src, move to a word, ^] and it will move you to the ‘definition’
> line.  Imagine each line is a function definition with calls to other
> functions.  You're wandering down and up a ‘call tree’, following
> possible execution paths.
>


  reply	other threads:[~2024-06-07 16:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 14:44 [TUHS] " Will Senn
2024-06-07 15:41 ` [TUHS] " Ralph Corderoy
2024-06-07 16:20   ` Will Senn [this message]
2024-06-07 16:58     ` Andy Kosela
2024-06-07 17:29 ` Marc Rochkind
2024-06-08  4:44   ` Dave Horsfall
2024-06-08  4:50     ` Warner Losh
2024-06-08  6:22       ` Rob Pike
2024-06-07 22:12 ` Scot Jenkins via TUHS
2024-06-08 10:19   ` [TUHS] POSIX ed(1)'s exit status. (Was: diving into vi...) Ralph Corderoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05302a0e-58b6-450c-8554-4546a409d603@gmail.com \
    --to=will.senn@gmail.com \
    --cc=ralph@inputplus.co.uk \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).