The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: tuhs@tuhs.org
Subject: Re: [TUHS] block operations in editors, was  My EuroBSDcon talk
Date: Tue, 17 Sep 2019 10:42:36 +1000	[thread overview]
Message-ID: <20190917004233.4cgn6vabnmgwl5q5@localhost.localdomain> (raw)
In-Reply-To: <201909170020.x8H0KWC6037690@tahoe.cs.Dartmouth.EDU>

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

At 2019-09-16T20:20:32-0400, Doug McIlroy wrote:
> Ed imposes a structure, making a (finite) file into an array, aka
> list, of lines. It's easy to define block moves and copies in a list.
> But what are the semantics of a block move, wherein one treats the
> list as a ragged-right 2D array? What gets pushed aside? In what
> direction?  How does a block move into column that not all destination
> rows reach? How do you cope when the bottom gets ragged? How about the
> top? Can one move blocks of tab-separated fields?
> 
> I think everyone has rued the lack of block operations at one time or
> another. But implementing them in any degree of generality is a
> stumbling block. What should the semantics be?

Just in case anyone didn't know, Vim has what it calls "visual block"
highlighting and operations.  CTRL-V begins one and you use the usual
movement keys to shape and size it, then an operator like (y)ank or
(d)elete.

It won't always work as one expects because of the very questions that
Doug raises above.

Vim also has characterwise blocks (begin with 'v') and linewise blocks
(begin with 'V').

The last is, more than any other single factor, what pulled me over from
traditional vi (really nvi in my case).  It was a big win over
line-counting with ":.,+n" expressions.  In retrospect I should have
been smarter and just typed ":.,/pattern/", using as /pattern/ some
short string that did not appear in any of the lines I wanted to operate
on.

Though the vi clone with the best name was, indisputably, elvis.

Regards,
Branden

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-09-17  0:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17  0:20 Doug McIlroy
2019-09-17  0:42 ` G. Branden Robinson [this message]
2019-09-17  2:02   ` George Michaelson
2019-09-17 11:01   ` Thomas Paulsen
2019-09-17  1:25 ` Bakul Shah
2019-09-17 11:34 Thomas Paulsen
2019-09-17 15:36 Noel Chiappa
2019-09-17 17:31 Doug McIlroy
2019-09-18  4:47 ` Steve Johnson
2019-09-18  4:52   ` Jon Steinhart

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=20190917004233.4cgn6vabnmgwl5q5@localhost.localdomain \
    --to=g.branden.robinson@gmail.com \
    --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).