Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Statistics means never having to say you're certain.


devel / comp.unix.shell / Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)

SubjectAuthor
* Is 'cd -' to be considered (in ksh, bash) deprecated for scripting?Janis Papanagnou
`* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forKaz Kylheku
 `* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forJanis Papanagnou
  `* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forEli the Bearded
   `* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forJanis Papanagnou
    +* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forKenny McCormack
    |`* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forJanis Papanagnou
    | `* The danger of command line editing (Was: Is 'cd -' to be considered (in ksh, basKenny McCormack
    |  +- Re: The danger of command line editing (Was: Is 'cd -' to beJanis Papanagnou
    |  `- Re: The danger of command line editing (Was: Is 'cd -' to beJanis Papanagnou
    +* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forKaz Kylheku
    |+* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forJanis Papanagnou
    ||`* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forJanis Papanagnou
    || `- Re: Is 'cd -' to be considered (in ksh, bash) deprecated forJanis Papanagnou
    |`* Re: Is 'cd -' to be considered (in ksh, bash) deprecated for scripting?Keith Thompson
    | +- VIM 'cq' command (Was: Is 'cd -' to be considered (in ksh, bash) deprecated for Kenny McCormack
    | `* Re: Is 'cd -' to be considered (in ksh, bash) deprecated forKaz Kylheku
    |  +- VIM's 'cq' command (Was: Is 'cd -' to be considered (in ksh, bash) deprecated foKenny McCormack
    |  `- Re: Is 'cd -' to be considered (in ksh, bash) deprecated for scripting?Keith Thompson
    `* Command line editing mode (was: Is 'cd -' to be considered (in ksh, bash) deprecAxel Reichert
     +- Re: Command line editing mode (was: Is 'cd -' to be considered (in ksh, bash) deKenny McCormack
     +- Re: Command line editing modeKeith Thompson
     +* Re: Command line editing mode (was: Is 'cd -' to be considered (inKaz Kylheku
     |`- Re: Command line editing modeAxel Reichert
     +* Re: Command line editing mode (was: Is 'cd -' to be considered (in ksh, bash) deEli the Bearded
     |+* Re: Command line editing modeAxel Reichert
     ||`* Re: Command line editing modeJanis Papanagnou
     || `- Re: Command line editing modeAxel Reichert
     |`* Re: Command line editing mode (was: Is 'cd -' to be considered (inGeoff Clare
     | +- Re: Command line editing mode (was: Is 'cd -' to be considered (inJalen Q
     | +- Re: Command line editing mode (was: Is 'cd -' to be considered (inJalen Q
     | `* Re: Command line editing mode (was: Is 'cd -' to be considered (inJalen Q
     |  `* Re: Command line editing mode (was: Is 'cd -' to be considered (inJalen Q
     |   `- Re: Command line editing mode (was: Is 'cd -' to be considered (inJalen Q
     +* Re: Command line editing modeJanis Papanagnou
     |`* [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command lineJanis Papanagnou
     | `* Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing Spiros Bousbouras
     |  +- Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: CommandJanis Papanagnou
     |  +* Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: CommandJanis Papanagnou
     |  |`- Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: CommandAragorn
     |  `- Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: CommandGeoff Clare
     +* Re: Command line editing modeSpiros Bousbouras
     |+* Re: Command line editing modeBrian Patrie
     ||`- Re: Command line editing modeSpiros Bousbouras
     |+- Thanks for all the feedback! (was: Command line editing mode)Axel Reichert
     |`* Re: Command line editing modeChristian Weisgerber
     | +- Re: Command line editing modeKaz Kylheku
     | `- Re: Command line editing modeKeith Thompson
     `* Re: Command line editing mode (was: Is 'cd -' to be considered (inBit Twister
      `* Re: Command line editing mode (was: Is 'cd -' to be considered (inAragorn
       `* Re: Command line editing modeKeith Thompson
        +* Re: Command line editing modeAragorn
        |`- Re: Command line editing modeKeith Thompson
        `- Re: Command line editing modeJanis Papanagnou

Pages:123
Re: Command line editing mode

<QlKWBI9CVK3MqO0zc@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5800&group=comp.unix.shell#5800

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!wMjcvFyyQbKkD1DyxkS8fQ.user.46.165.242.91.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 5 Nov 2022 05:31:26 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <QlKWBI9CVK3MqO0zc@bongo-ra.co>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com> <tjiu05$3e9u7$1@dont-email.me>
<eli$2210291718@qaz.wtf> <tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="19778"; posting-host="wMjcvFyyQbKkD1DyxkS8fQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sat, 5 Nov 2022 05:31 UTC

On Fri, 04 Nov 2022 20:24:27 +0100
Axel Reichert <mail@axel-reichert.de> wrote:
> Do you use
> vi mode for other command line editing stuff as well? If so, can you
> comment on the motivation? While I am an adherent to the other editor
> religion, I can reasonably work with vi as well, but for command line
> editing a mode-based paradigm seems especially strange. No holy wars, I
> am genuinely curious. And even the vi users I know will normally stick
> to bash's default emacs editing mode.

Yes , I use vi mode for all command line editing because I know it well
and find it natural including the mode model although in command line
it annoys me a bit that I don't get visual confirmation on which mode
I'm in. I can't imagine why one would use one set of keys (combinations)
for file editing and a very different one for command line editing.

Re: Command line editing mode

<tk51jt$2j1$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5801&group=comp.unix.shell#5801

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!1kzjxob1apDgcOKlV0dflQ.user.46.165.242.75.POSTED!not-for-mail
From: bpatrie@bellsouth.spamisicky.net (Brian Patrie)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 5 Nov 2022 01:59:08 -0500
Organization: an elaborate system of piles and accidents
Message-ID: <tk51jt$2j1$1@gioia.aioe.org>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<QlKWBI9CVK3MqO0zc@bongo-ra.co>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="2657"; posting-host="1kzjxob1apDgcOKlV0dflQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.2.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Brian Patrie - Sat, 5 Nov 2022 06:59 UTC

Spiros Bousbouras wrote:
> Yes , I use vi mode for all command line editing because I know it
> well and find it natural including the mode model although in command
> line it annoys me a bit that I don't get visual confirmation on which
> mode I'm in. I can't imagine why one would use one set of keys
> (combinations) for file editing and a very different one for command
> line editing.

I edit files with vim (having used vi since the mid '80s), and edit
command lines with emacs mode in zsh. I never gave it much
thought--especially since vi command mode is just a ^X^V away. Each
mode has its upsides. And most anything is better than the rudimentary
(backspace, and retype) editing that we had in sh.

I briefly had a mode indicator set up for vi mode; but it was
unnecessary clutter; and vi didn't have one, so i don't miss it. (I'm
still not used to it being there in vim, and pretty much ignore it.)

Re: Command line editing mode

<xYTJtWk2fQ3JT0axP@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5802&group=comp.unix.shell#5802

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!wMjcvFyyQbKkD1DyxkS8fQ.user.46.165.242.91.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 5 Nov 2022 08:36:33 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <xYTJtWk2fQ3JT0axP@bongo-ra.co>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com> <tjiu05$3e9u7$1@dont-email.me>
<eli$2210291718@qaz.wtf> <tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<QlKWBI9CVK3MqO0zc@bongo-ra.co> <tk51jt$2j1$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="1963"; posting-host="wMjcvFyyQbKkD1DyxkS8fQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Server-Commands: nowebcancel
X-Notice: Filtered by postfilter v. 0.9.2
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sat, 5 Nov 2022 08:36 UTC

On Sat, 5 Nov 2022 01:59:08 -0500
Brian Patrie <bpatrie@bellsouth.spamisicky.net> wrote:
> I briefly had a mode indicator set up for vi mode; but it was
> unnecessary clutter; and vi didn't have one, so i don't miss it. (I'm
> still not used to it being there in vim, and pretty much ignore it.)

You can turn it off in vim with
:let &showmode = 0

[OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)

<tk5q0v$2g19o$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5803&group=comp.unix.shell#5803

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line
editing mode)
Date: Sat, 5 Nov 2022 14:55:42 +0100
Organization: A noiseless patient Spider
Lines: 85
Message-ID: <tk5q0v$2g19o$1@dont-email.me>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<tk4i8j$25bfa$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Nov 2022 13:55:43 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="c65e6d8ea4299be6ceec93aadd3a87b3";
logging-data="2622776"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Sxpd1Ju1X9/RIBGbMoUpD"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:INGbd6NqjdVstOj3yCHq/8YjMlw=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <tk4i8j$25bfa$1@dont-email.me>
 by: Janis Papanagnou - Sat, 5 Nov 2022 13:55 UTC

On 05.11.2022 03:37, Janis Papanagnou wrote:
> On 04.11.2022 20:24, Axel Reichert wrote:
>> While I am an adherent to the other editor
>> religion, I can reasonably work with vi as well, but for command line
>> editing a mode-based paradigm seems especially strange.
>
> ...so it's probably better if you elaborate on why and what you think
> is "especially strange" so that I can better focus on the information
> you're asking for.

To anticipate...

To repel folks we can start with "modes" :-) What do we have?
Visual mode in Vim/Gvim - I cannot use it in ksh's built-in command
line emulation and don't need/use it in ksh's Esc-V editor call.
Ex-mode - supposed to work on selected/all lines of the input file;
I rarely (or don't ?) use it when editing shell commands.
So what we actually have is Command/Normal-mode and something that
we may call Input-mode and I think we can focus on that.

I think it is helpful if we ignore input as a separate "mode" and
just view it as a method of providing arguments to (vi-)commands!
So that everything you do in Vi/Vim is just issuing (vi-)commands.

For example a simple command is 'x' (it requires no arguments).
To move (adjacent) to a character you specify the target, e.g.
'f'<c> (or 't'<c>), and commands of this sort take an argument.
Other movements have implicit semantics (without argument, like
'w', 'W', '4W', 'e', '$'; may be prefixed with parameters like '4').
And yet other commands have arguments that can have _arbitrary_
amounts of characters, e.g. 'i', 'a'; so the end of the argument
data must be indicated somehow, and the ESC key is used for that.
We have 'i' <input> <ESC>. - We may call that "Input-Mode" if we
like but it's not really necessary, and I think it's probably a
hindrance if we like to understand the vi concept.

So the essence is that it's not so much about modes but about what
constitutes the editing. It is the movement and editing-commands.

Vi supports movements to arbitrary syntactical entities; relative
to characters, words, lines, sentences, paragraphs, bracketed
expressions, screen, file. And Vi supports commands (almost all
characters are commands). You can orthogonally combine movements
with commands and parameterize them in addition.
'w' or '4w' are movements, 'dw' or 'd4w' is a (delete-)command
that works on the range specified my the movement. You can also
parameterize the command operator, '3dw' or '3d4w'.

Simple movements can be mapped to function keys on the keyboard;
<Home>, <Page-Up>, <Arrow-Right>. And simple commands may also be
mapped to function keys; <Delete>, <Backspace>. Some more movements
can be composed by control-keys (<Ctrl>, <Alt>, etc.; e.g. <Ctrl>
<Right-Arrow>).

Vi has far too many movements and commands (parameterized or not)
to use simple (easier to perceive) function keys on the keyboard,
while those that can be mapped [in Vim/Gvim] typically also work as
expected.

The reason why I use vi is the fact that I can address arbitrary
entities in the text with a minimum amount of keystrokes. I think
this is the key-observation. Operations on the data (the editing)
is then only one more key to be typed ('d', 'c', 'y'; to delete,
change, yank/copy). This orthogonality is another reason for using
Vi.

I see folks hammering on <Arrow-Left> keys to navigate, or mark
text and delete it (as I also do in Windows OS contexts) with, say,
<Shift><Ctrl><Arrow><Arrow><Arrow><Delete> function keys. I prefer
the more efficient Vi-commands. They also allow me to a very large
degree to type "blind"; to delete to the second colon I type 'd2f:'
and know it is accurate, because I addressed the syntactical entity
and not moved "manually" there (that I have to control "visually").
Issuing commands also allows simple repetition of commands; I often
have to do the same task in several places. A simple '.' will repeat
the last command; if you typed 'dwdwdw' to delete three words the
'.' will delete another word, and if you typed 'd3w' the '.' will
delete another three words.

With that powerful tool I try to not use simpler and less efficient
methods (if avoidable). That's why I use vi-mode and Esc-V editing
with vim in shell.

Janis

Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)

<HdId43NmZ3boaKsDB@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5804&group=comp.unix.shell#5804

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)
Date: Sat, 5 Nov 2022 14:21:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <HdId43NmZ3boaKsDB@bongo-ra.co>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com> <tjiu05$3e9u7$1@dont-email.me>
<eli$2210291718@qaz.wtf> <tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<tk4i8j$25bfa$1@dont-email.me> <tk5q0v$2g19o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 5 Nov 2022 14:21:21 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="1937bcf1794f82c5614ec37b38610faf";
logging-data="2634144"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4f8mBvkKnBMbC+brpgrUm"
Cancel-Lock: sha1:Ydd1bRGXfStfhCbqW64zAiy0djQ=
In-Reply-To: <tk5q0v$2g19o$1@dont-email.me>
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sat, 5 Nov 2022 14:21 UTC

On Sat, 5 Nov 2022 14:55:42 +0100
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> I see folks hammering on <Arrow-Left> keys to navigate, or mark
> text and delete it (as I also do in Windows OS contexts) with, say,
> <Shift><Ctrl><Arrow><Arrow><Arrow><Delete> function keys.

Where does this apply ?

> I prefer
> the more efficient Vi-commands. They also allow me to a very large
> degree to type "blind"; to delete to the second colon I type 'd2f:'
> and know it is accurate, because I addressed the syntactical entity
> and not moved "manually" there (that I have to control "visually").

A frustration I have with command line editing is that there is no
search i.e. / and ? don't seem to work. The reason I would find
search useful is that sometimes it is the quickest way to specify a
point in the text because with things like f<some-char> or
t<some-char> there may be too many of <some-char> to see with a
quick look which number I should choose. Whereas with / and ? you
can give a longer sequence. This serves me well with file editing but I
don't know of an analog for command line editing. Obviously I can issue
the edit-and-execute-command command and start an actual vim instance.

--
A specification that has been superseded by a more recent specification or is
for any other reason considered to be obsolete is assigned to the "Historic"
level. (Purists have suggested that the word should be "Historical"; however,
at this point the use of "Historic" is historical.)
RFC 2026

Re: Command line editing mode

<874jvdea9w.fsf@axel-reichert.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5805&group=comp.unix.shell#5805

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: mail@axel-reichert.de (Axel Reichert)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 05 Nov 2022 15:38:51 +0100
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <874jvdea9w.fsf@axel-reichert.de>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<20221104160053.964@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="fc4112e9b50e5c1da6fab7d05cd994e5";
logging-data="2636952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wmxn4ZqBYHO8gsQOt0EdjRF6eiu7jCZk="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:i1l6E1X3pCfmXWaccKF33dH0xGU=
sha1:w70U1gBITXKnapU+qg5eo4ul58E=
 by: Axel Reichert - Sat, 5 Nov 2022 14:38 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> This is not a vi mode; it's just launching an external editor.
>
> In Bash, Ctrl-X Ctrl-E does this, by default.

In fact, I never used this. I learned something here, thanks. But at
this point, we are close to eshell or other shell modes in Emacs.

Best regards

Axel

Re: Command line editing mode

<87zgd5cvg3.fsf@axel-reichert.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5806&group=comp.unix.shell#5806

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: mail@axel-reichert.de (Axel Reichert)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 05 Nov 2022 15:44:28 +0100
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <87zgd5cvg3.fsf@axel-reichert.de>
References: <tjhrk0$37g49$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<eli$2211042214@qaz.wtf>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="fc4112e9b50e5c1da6fab7d05cd994e5";
logging-data="2636952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9KM69vTjOKYUpEFB7s4DjvRTNUtE2lhQ="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:bz55WbvvaS6+RYK2ve14JUZhgCk=
sha1:ZVcH6rL9BAMLxbMs0eFuYViAgdk=
 by: Axel Reichert - Sat, 5 Nov 2022 14:44 UTC

Eli the Bearded <*@eli.users.panix.com> writes:

> Only one or two cW or rx type things make me reach for "set -o vi".

Might be a fun experiment to set up newbie's command line defaults like
this. Perhaps it will look similar to a session with "ed":

https://cs.wellesley.edu/~cs249/Resources/ed_is_the_standard_text_editor.html

(-:

Axel

Thanks for all the feedback! (was: Command line editing mode)

<87v8ntcuva.fsf_-_@axel-reichert.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5807&group=comp.unix.shell#5807

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: mail@axel-reichert.de (Axel Reichert)
Newsgroups: comp.unix.shell
Subject: Thanks for all the feedback! (was: Command line editing mode)
Date: Sat, 05 Nov 2022 15:56:57 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <87v8ntcuva.fsf_-_@axel-reichert.de>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<QlKWBI9CVK3MqO0zc@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="fc4112e9b50e5c1da6fab7d05cd994e5";
logging-data="2636952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KDQkSldbwzkEN08m99bUYv4POVgQX9y4="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:DFy8tjR4fc4xAjHYFyYi3iL8KAs=
sha1:upQYcmlA4+VI2AsPqxXqBkDq20Q=
 by: Axel Reichert - Sat, 5 Nov 2022 14:56 UTC

Spiros Bousbouras <spibou@gmail.com> writes:

> Yes , I use vi mode for all command line editing because I know it well
> and find it natural including the mode model although in command line
> it annoys me a bit that I don't get visual confirmation on which mode
> I'm in.

O.K., then my perception was a biased one (not knowing enough hard-core
vi users). Thanks!

Axel

Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)

<tk5trf$2gt4f$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5808&group=comp.unix.shell#5808

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command
line editing mode)
Date: Sat, 5 Nov 2022 16:01:03 +0100
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <tk5trf$2gt4f$1@dont-email.me>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<tk4i8j$25bfa$1@dont-email.me> <tk5q0v$2g19o$1@dont-email.me>
<HdId43NmZ3boaKsDB@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Nov 2022 15:01:03 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="c65e6d8ea4299be6ceec93aadd3a87b3";
logging-data="2651279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192HKfrdqTE0TVqU7lj/2TK"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:1YkpRMKTSR1K+HXWe+JVBhH1vtk=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <HdId43NmZ3boaKsDB@bongo-ra.co>
 by: Janis Papanagnou - Sat, 5 Nov 2022 15:01 UTC

On 05.11.2022 15:21, Spiros Bousbouras wrote:
>
> A frustration I have with command line editing is that there is no
> search i.e. / and ? don't seem to work.

Works for me. To search the shell history (ksh) I 'Esc' '/' <word> and
jump with 'n' and 'N' forward or backward.

> The reason I would find
> search useful is that sometimes it is the quickest way to specify a
> point in the text because with things like f<some-char> or
> t<some-char> there may be too many of <some-char> to see with a
> quick look which number I should choose.

Ah, you mean to place the pattern to the word on the _current_ line?
Yes, that seems to not work in the shell built-in stripped vi-clone.

Usually I work around that in shell by using other appropriate methods;
that may be (for example); '$' and 'F' to search from the end of the
line, and/or combined with multiplicity parameters, e.g., '3f/', or by
moving closer first, e.g. addressing a unique character 'f@' and then
the desired one 'f/', or moving by other syntactical entities first,
say, '3W' then 'f/'. Also the repetition character helps reaching any
point fast, e.g., 'f/;;;'. Or roughly addressing the column where to
continue your refined search, e.g. '130|'. While I understand well
the frustration there's (for me) a lot of efficient options available.

In practice my lines are not that long, though, that I'd have issues
with that [in shell-vi] missing function [on a line]. And I can also
resort to the (real) editor with "Esc V".

> Whereas with / and ? you
> can give a longer sequence. This serves me well with file editing but I
> don't know of an analog for command line editing. Obviously I can issue
> the edit-and-execute-command command and start an actual vim instance.

This is what I am doing most time anyway for the more complex commands
(or for very large lines that I avoid).

Janis

Re: Command line editing mode

<tk5vng$2haqb$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5809&group=comp.unix.shell#5809

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 5 Nov 2022 16:33:04 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <tk5vng$2haqb$1@dont-email.me>
References: <tjhrk0$37g49$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<eli$2211042214@qaz.wtf> <87zgd5cvg3.fsf@axel-reichert.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Nov 2022 15:33:04 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="c65e6d8ea4299be6ceec93aadd3a87b3";
logging-data="2665291"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RcQdsCdEnn+FZ0q3RQVUS"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:rIqlVQKNAGrRxdXg1vWNvHrem8I=
In-Reply-To: <87zgd5cvg3.fsf@axel-reichert.de>
 by: Janis Papanagnou - Sat, 5 Nov 2022 15:33 UTC

On 05.11.2022 15:44, Axel Reichert wrote:
> Eli the Bearded <*@eli.users.panix.com> writes:
>
>> Only one or two cW or rx type things make me reach for "set -o vi".
>
> Might be a fun experiment to set up newbie's command line defaults like
> this. Perhaps it will look similar to a session with "ed":

Vi is no toy editor! You should never force newbies to use it without
instruction. This sort of "experiment" would only lead to deterrence;
so probably only advisable for supporters of "religious holy editor
wars".

Janis

Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)

<tk60e4$2hg0d$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5810&group=comp.unix.shell#5810

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command
line editing mode)
Date: Sat, 5 Nov 2022 16:45:08 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <tk60e4$2hg0d$1@dont-email.me>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<tk4i8j$25bfa$1@dont-email.me> <tk5q0v$2g19o$1@dont-email.me>
<HdId43NmZ3boaKsDB@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Nov 2022 15:45:08 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="c65e6d8ea4299be6ceec93aadd3a87b3";
logging-data="2670605"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lRbRHmXIfk1a6lID0Oo/4"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:uA1nX1BPD9INOm2LP5xlekcvQfU=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <HdId43NmZ3boaKsDB@bongo-ra.co>
 by: Janis Papanagnou - Sat, 5 Nov 2022 15:45 UTC

On 05.11.2022 15:21, Spiros Bousbouras wrote:
> On Sat, 5 Nov 2022 14:55:42 +0100
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>> I see folks hammering on <Arrow-Left> keys to navigate, or mark
>> text and delete it (as I also do in Windows OS contexts) with, say,
>> <Shift><Ctrl><Arrow><Arrow><Arrow><Delete> function keys.
>
> Where does this apply ?

You find this in many GUI based editing tools, on Windows (as I wrote)
but also, e.g., in the Thunderbird composer I use to write this post
on Linux. - With the <Shift> and <Ctrl> keys pressed you can navigate
with your arrow keys to mark the text, and then hitting the <Delete>
key deletes that text. On Windows I use it with its text editors (is
it called "Notepad+"?) and word processors (MS Word) and other MS
software (Excel, etc.). The <Shift> is actually for marking and the
<Ctrl> is for moving in larger entities than character, word-wise.

Janis

Re: Command line editing mode (was: Is 'cd -' to be considered (in ksh, bash) deprecated for scripting?)

<slrntmd334.f67.BitTwister@wb.home.test>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5811&group=comp.unix.shell#5811

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: BitTwister@mouse-potato.com (Bit Twister)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode (was: Is 'cd -' to be considered (in
ksh, bash) deprecated for scripting?)
Date: Sat, 5 Nov 2022 11:16:36 -0500
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <slrntmd334.f67.BitTwister@wb.home.test>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
Injection-Info: reader01.eternal-september.org; posting-host="bef0c972c49beb4c198b249376b14469";
logging-data="2677810"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/rY9CnMsYvLAIiTaoiEtBQcxRrN2t/DU="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:9lKyiDDvHtoL899qYgE1GHkVxOw=
 by: Bit Twister - Sat, 5 Nov 2022 16:16 UTC

On Fri, 04 Nov 2022 20:24:27 +0100, Axel Reichert wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>
>> Whenever a command gets typed that is getting lengthy (or use an
>> inherently long compound command) I just "Esc v" and get a vi instance
>> where I can continue typing any command with arbitrary complexity.
>
> This is in fact the first time I read of somebody using this. Do you use
> vi mode for other command line editing stuff as well? If so, can you
> comment on the motivation? While I am an adherent to the other editor
> religion, I can reasonably work with vi as well, but for command line
> editing a mode-based paradigm seems especially strange. No holy wars, I
> am genuinely curious. And even the vi users I know will normally stick
> to bash's default emacs editing mode.

What does it matter. User can set VISUAL=editor_of_choice_here
for command line editing and EDITOR=editor_of_choice_here for file
editing.

Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)Access")

<20221105182558.65efd6d7@nx-74205>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5812&group=comp.unix.shell#5812

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: telcontar@duck.com (Aragorn)
Newsgroups: comp.unix.shell
Subject: Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command
line editing mode)Access")
Date: Sat, 5 Nov 2022 18:25:58 +0100
Organization: A noiseless patient Strider
Lines: 50
Message-ID: <20221105182558.65efd6d7@nx-74205>
References: <tjhrk0$37g49$1@dont-email.me>
<20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me>
<eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me>
<87h6zeed5g.fsf_-_@axel-reichert.de>
<tk4i8j$25bfa$1@dont-email.me>
<tk5q0v$2g19o$1@dont-email.me>
<HdId43NmZ3boaKsDB@bongo-ra.co>
<tk60e4$2hg0d$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: reader01.eternal-september.org; posting-host="db50e657660c5ee03a6ea07d47c70667";
logging-data="2503452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1999FwlSe3shhm+RZNyVhxT"
Cancel-Lock: sha1:dBtjRBOpJohgzqHkThEv1nf9PvU=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-pc-linux-gnu)
 by: Aragorn - Sat, 5 Nov 2022 17:25 UTC

On 05.11.2022 at 16:45, Janis Papanagnou scribbled:

> On 05.11.2022 15:21, Spiros Bousbouras wrote:
> > On Sat, 5 Nov 2022 14:55:42 +0100
> > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> >> I see folks hammering on <Arrow-Left> keys to navigate, or mark
> >> text and delete it (as I also do in Windows OS contexts) with, say,
> >> <Shift><Ctrl><Arrow><Arrow><Arrow><Delete> function keys.
> >
> > Where does this apply ?
>
> You find this in many GUI based editing tools, on Windows (as I wrote)
> but also, e.g., in the Thunderbird composer I use to write this post
> on Linux. - With the <Shift> and <Ctrl> keys pressed you can navigate
> with your arrow keys to mark the text, and then hitting the <Delete>
> key deletes that text. On Windows I use it with its text editors (is
> it called "Notepad+"?) and word processors (MS Word) and other MS
> software (Excel, etc.). The <Shift> is actually for marking and the
> <Ctrl> is for moving in larger entities than character, word-wise.

That's the IBM CUA ("Common User Access") standard, which also includes
Shift+Del and/or Ctrl+C for cutting, Shift+Ins and/or Ctrl+V for
pasting, and Ctrl+Ins and/or Ctrl+C for copying to the clipboard/buffer.

I think it was already introduced in the days of MS-/PC-DOS, but it was
certainly being used all over OS/2, and then of course, MS-Windows
also came to adopt it. It was also meant to be reminiscent of the
shortcuts used on Apple Macintosh machines, where instead of the Ctrl
key you had to use the Command key, I believe — I don't have a lot of
experience with Macs.

Emacs also supports CUA — or at least, up to a certain extent — but it's
not enabled by default because it conflicts with "native" Emacs key
bindings, and Richard Stallman felt that it would throw seasoned Emacs
users off if CUA were enabled on a fresh install.

Konsole, the default terminal emulator in KDE Plasma, also supports
CUA, but there you have to include the Shift key — i.e. Ctrl+Shift+C,
Ctrl+Shift+X and Ctrl+Shift+V — in order not to conflict with the
standard terminal key bindings. I do not know whether other terminal
emulators support it; character-mode virtual consoles in and of
themselves do not of course, by lack of a clipboard buffer.

--
With respect,
= Aragorn

Re: Command line editing mode (was: Is 'cd -' to be considered (in ksh, bash) deprecated for scripting?)

<20221105183435.3d541210@nx-74205>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5813&group=comp.unix.shell#5813

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: telcontar@duck.com (Aragorn)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode (was: Is 'cd -' to be considered (in
ksh, bash) deprecated for scripting?)
Date: Sat, 5 Nov 2022 18:34:35 +0100
Organization: A noiseless patient Strider
Lines: 41
Message-ID: <20221105183435.3d541210@nx-74205>
References: <tjhrk0$37g49$1@dont-email.me>
<20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me>
<eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me>
<87h6zeed5g.fsf_-_@axel-reichert.de>
<slrntmd334.f67.BitTwister@wb.home.test>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: reader01.eternal-september.org; posting-host="db50e657660c5ee03a6ea07d47c70667";
logging-data="2503452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19A4wa6YjYnvAy0byXI/+Tj"
Cancel-Lock: sha1:OB77LMjgTGR2fUPvLNT89G7IiPY=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-pc-linux-gnu)
 by: Aragorn - Sat, 5 Nov 2022 17:34 UTC

On 05.11.2022 at 11:16, Bit Twister scribbled:

> On Fri, 04 Nov 2022 20:24:27 +0100, Axel Reichert wrote:
> > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> >
> >> Whenever a command gets typed that is getting lengthy (or use an
> >> inherently long compound command) I just "Esc v" and get a vi
> >> instance where I can continue typing any command with arbitrary
> >> complexity.
> >
> > This is in fact the first time I read of somebody using this. Do
> > you use vi mode for other command line editing stuff as well? If
> > so, can you comment on the motivation? While I am an adherent to
> > the other editor religion, I can reasonably work with vi as well,
> > but for command line editing a mode-based paradigm seems especially
> > strange. No holy wars, I am genuinely curious. And even the vi
> > users I know will normally stick to bash's default emacs editing
> > mode.
>
> What does it matter. User can set VISUAL=editor_of_choice_here
> for command line editing and EDITOR=editor_of_choice_here for file
> editing.

Um, no. VISUAL sets the editor that will be used for command-line
editing when in X11 — I do not know whether it works on Wayland — and
EDITOR sets the editor for command-line editing and as the default
editor for file editing [*] when working from a character-mode virtual
console.

VISUAL can therefore be set to either a GUI editor (such as Kate) or a
character-mode editor (such as nano, pico, micro, emacs-nox or vi(m)).

[*] I do not know whether the value of VISUAL overrides the XDG settings
or vice versa.

--
With respect,
= Aragorn

Re: Command line editing mode

<87pme1kxjx.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5814&group=comp.unix.shell#5814

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 05 Nov 2022 12:31:46 -0700
Organization: None to speak of
Lines: 50
Message-ID: <87pme1kxjx.fsf@nosuchdomain.example.com>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<slrntmd334.f67.BitTwister@wb.home.test>
<20221105183435.3d541210@nx-74205>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="4259117d4a6a84457329eab327d8f4cc";
logging-data="2767844"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19O6Z8ztdIOANnmNjtMe4nd"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:GAMlmKRktdGqWf+b/KA0Wm+s5kE=
sha1:U2uPeJPDsIg7yEL2XvpKzOHH62A=
 by: Keith Thompson - Sat, 5 Nov 2022 19:31 UTC

Aragorn <telcontar@duck.com> writes:
> On 05.11.2022 at 11:16, Bit Twister scribbled:
>> On Fri, 04 Nov 2022 20:24:27 +0100, Axel Reichert wrote:
>> > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>> >
>> >> Whenever a command gets typed that is getting lengthy (or use an
>> >> inherently long compound command) I just "Esc v" and get a vi
>> >> instance where I can continue typing any command with arbitrary
>> >> complexity.
>> >
>> > This is in fact the first time I read of somebody using this. Do
>> > you use vi mode for other command line editing stuff as well? If
>> > so, can you comment on the motivation? While I am an adherent to
>> > the other editor religion, I can reasonably work with vi as well,
>> > but for command line editing a mode-based paradigm seems especially
>> > strange. No holy wars, I am genuinely curious. And even the vi
>> > users I know will normally stick to bash's default emacs editing
>> > mode.
>>
>> What does it matter. User can set VISUAL=editor_of_choice_here
>> for command line editing and EDITOR=editor_of_choice_here for file
>> editing.
>
> Um, no. VISUAL sets the editor that will be used for command-line
> editing when in X11 — I do not know whether it works on Wayland — and
> EDITOR sets the editor for command-line editing and as the default
> editor for file editing [*] when working from a character-mode virtual
> console.
>
> VISUAL can therefore be set to either a GUI editor (such as Kate) or a
> character-mode editor (such as nano, pico, micro, emacs-nox or vi(m)).
>
>
> [*] I do not know whether the value of VISUAL overrides the XDG settings
> or vice versa.

As I recall, the original idea was that $VISUAL would be a full-screen
editor like vi, and $EDITOR might be a line editor like ed or ex.
Programs would invoke $VISUAL when running on a "smart" terminal, which
at the time meant a terminal on which the cursor could be moved around
on the (text-only) screen.

I don't know whether any programs invoke $VISUAL if a GUI is available
and fall back to $EDITOR if it isn't. (I have both set to "vim", so I
don't pay much attention to the distinction.)

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */

Re: Command line editing mode

<87r0yhchhn.fsf@axel-reichert.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5815&group=comp.unix.shell#5815

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: mail@axel-reichert.de (Axel Reichert)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 05 Nov 2022 20:45:56 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <87r0yhchhn.fsf@axel-reichert.de>
References: <tjhrk0$37g49$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<eli$2211042214@qaz.wtf> <87zgd5cvg3.fsf@axel-reichert.de>
<tk5vng$2haqb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="fc4112e9b50e5c1da6fab7d05cd994e5";
logging-data="2773821"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xfVpCjNu1dRLcZfPBPTUmswsch4wmA+k="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:itTVVo/1vgshQbBkp80xggEBhgA=
sha1:ed4cCPCM3Y4IUIG+aaOyWE85wq0=
 by: Axel Reichert - Sat, 5 Nov 2022 19:45 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:

> Vi is no toy editor!

I know. It is one of the two non-toy editors.

> You should never force newbies to use it without instruction.

Hey, that was just some fun on the principle of discoverability.

Best regards

Axel

Re: Command line editing mode

<20221105210034.565c97a4@nx-74205>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5816&group=comp.unix.shell#5816

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: telcontar@duck.com (Aragorn)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 5 Nov 2022 21:00:34 +0100
Organization: A noiseless patient Strider
Lines: 51
Message-ID: <20221105210034.565c97a4@nx-74205>
References: <tjhrk0$37g49$1@dont-email.me>
<20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me>
<eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me>
<87h6zeed5g.fsf_-_@axel-reichert.de>
<slrntmd334.f67.BitTwister@wb.home.test>
<20221105183435.3d541210@nx-74205>
<87pme1kxjx.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: reader01.eternal-september.org; posting-host="db50e657660c5ee03a6ea07d47c70667";
logging-data="2726452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19J00d7TkfEXuBfTt2WNfSl"
Cancel-Lock: sha1:xIsIavPEtKrDFIYiFZQAapk2pUc=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-pc-linux-gnu)
 by: Aragorn - Sat, 5 Nov 2022 20:00 UTC

On 05.11.2022 at 12:31, Keith Thompson scribbled:

> Aragorn <telcontar@duck.com> writes:
> > On 05.11.2022 at 11:16, Bit Twister scribbled:
> >>
> >> What does it matter. User can set VISUAL=editor_of_choice_here
> >> for command line editing and EDITOR=editor_of_choice_here for file
> >> editing.
> >
> > Um, no. VISUAL sets the editor that will be used for command-line
> > editing when in X11 — I do not know whether it works on Wayland —
> > and EDITOR sets the editor for command-line editing and as the
> > default editor for file editing [*] when working from a
> > character-mode virtual console.
> >
> > VISUAL can therefore be set to either a GUI editor (such as Kate)
> > or a character-mode editor (such as nano, pico, micro, emacs-nox or
> > vi(m)).
> >
> >
> > [*] I do not know whether the value of VISUAL overrides the XDG
> > settings or vice versa.
>
> As I recall, the original idea was that $VISUAL would be a full-screen
> editor like vi, and $EDITOR might be a line editor like ed or ex.

That is possible, yes.

> Programs would invoke $VISUAL when running on a "smart" terminal,
> which at the time meant a terminal on which the cursor could be moved
> around on the (text-only) screen.
>
> I don't know whether any programs invoke $VISUAL if a GUI is available
> and fall back to $EDITOR if it isn't. (I have both set to "vim", so I
> don't pay much attention to the distinction.)

I have VISUAL set to /usr/bin/kate and EDITOR to /usr/bin/nano. If I
press Ctrl+X followed by Ctrl+E in a terminal window, then it'll bring
up Kate. I presume it'll bring up nano when I'm in a character-mode
tty, but so far I haven't used any command editing by way of an editor
there yet on this system. On my previous system, VISUAL was unset and
EDITOR was set to emacs, and there I did use the command editing
function in a tty.

--
With respect,
= Aragorn

Re: Command line editing mode

<tk7546$2pqcq$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5817&group=comp.unix.shell#5817

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sun, 6 Nov 2022 03:11:18 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <tk7546$2pqcq$1@dont-email.me>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<slrntmd334.f67.BitTwister@wb.home.test> <20221105183435.3d541210@nx-74205>
<87pme1kxjx.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 6 Nov 2022 02:11:18 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="dfad6c218f5745384967f8952b0cd9c8";
logging-data="2943386"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8b9S77OJgBZNt3Y3Tq6rI"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:8wQu4gpgnyh3Tx3TpuCXdUFZXog=
In-Reply-To: <87pme1kxjx.fsf@nosuchdomain.example.com>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Sun, 6 Nov 2022 02:11 UTC

On 05.11.2022 20:31, Keith Thompson wrote:
> Aragorn <telcontar@duck.com> writes:
>>
>> Um, no. VISUAL sets the editor that will be used for command-line
>> editing when in X11 — I do not know whether it works on Wayland — and
>> EDITOR sets the editor for command-line editing and as the default
>> editor for file editing [*] when working from a character-mode virtual
>> console.
>>
>> VISUAL can therefore be set to either a GUI editor (such as Kate) or a
>> character-mode editor (such as nano, pico, micro, emacs-nox or vi(m)).
>>
>>
>> [*] I do not know whether the value of VISUAL overrides the XDG settings
>> or vice versa.
>
> As I recall, the original idea was that $VISUAL would be a full-screen
> editor like vi, and $EDITOR might be a line editor like ed or ex.
> Programs would invoke $VISUAL when running on a "smart" terminal, which
> at the time meant a terminal on which the cursor could be moved around
> on the (text-only) screen.
>
> I don't know whether any programs invoke $VISUAL if a GUI is available
> and fall back to $EDITOR if it isn't. (I have both set to "vim", so I
> don't pay much attention to the distinction.)

Earlier in this thread I gave an example where I defined this variable
to point to a wrapper script that (non-GUI) ksh obviously invoked, and
in that wrapper were just other (non-GUI) command-line tools like vim.

Janis

Re: Command line editing mode

<87fsewlt51.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5818&group=comp.unix.shell#5818

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sat, 05 Nov 2022 19:21:46 -0700
Organization: None to speak of
Lines: 60
Message-ID: <87fsewlt51.fsf@nosuchdomain.example.com>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<slrntmd334.f67.BitTwister@wb.home.test>
<20221105183435.3d541210@nx-74205>
<87pme1kxjx.fsf@nosuchdomain.example.com>
<20221105210034.565c97a4@nx-74205>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="3509a1ccaa8abfb27016cb3d4a090b49";
logging-data="2940292"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+C8cFuwK6rbcZAGsUd61Ti"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:aL99hdj9Lm6zKuvFwT+kCRMcar0=
sha1:LIBDaDK4jujEzwKh61ZJGYvewoU=
 by: Keith Thompson - Sun, 6 Nov 2022 02:21 UTC

Aragorn <telcontar@duck.com> writes:
> On 05.11.2022 at 12:31, Keith Thompson scribbled:
>> Aragorn <telcontar@duck.com> writes:
>> > On 05.11.2022 at 11:16, Bit Twister scribbled:
>> >> What does it matter. User can set VISUAL=editor_of_choice_here
>> >> for command line editing and EDITOR=editor_of_choice_here for file
>> >> editing.
>> >
>> > Um, no. VISUAL sets the editor that will be used for command-line
>> > editing when in X11 — I do not know whether it works on Wayland —
>> > and EDITOR sets the editor for command-line editing and as the
>> > default editor for file editing [*] when working from a
>> > character-mode virtual console.
>> >
>> > VISUAL can therefore be set to either a GUI editor (such as Kate)
>> > or a character-mode editor (such as nano, pico, micro, emacs-nox or
>> > vi(m)).
>> >
>> >
>> > [*] I do not know whether the value of VISUAL overrides the XDG
>> > settings or vice versa.
>>
>> As I recall, the original idea was that $VISUAL would be a full-screen
>> editor like vi, and $EDITOR might be a line editor like ed or ex.
>
> That is possible, yes.
>
>> Programs would invoke $VISUAL when running on a "smart" terminal,
>> which at the time meant a terminal on which the cursor could be moved
>> around on the (text-only) screen.
>>
>> I don't know whether any programs invoke $VISUAL if a GUI is available
>> and fall back to $EDITOR if it isn't. (I have both set to "vim", so I
>> don't pay much attention to the distinction.)
>
> I have VISUAL set to /usr/bin/kate and EDITOR to /usr/bin/nano. If I
> press Ctrl+X followed by Ctrl+E in a terminal window, then it'll bring
> up Kate. I presume it'll bring up nano when I'm in a character-mode
> tty, but so far I haven't used any command editing by way of an editor
> there yet on this system. On my previous system, VISUAL was unset and
> EDITOR was set to emacs, and there I did use the command editing
> function in a tty.

It would be interesting to know if your assuption is correct.

My impression (and I'm not certain of this) is that most programs that
invoke an editor will use $VISUAL, then $EDITOR if it's not set, then
some default (vi, emacs, nano, or something else, depending on the whim
of the developer) if neither is set. The distinction between $VISUAL
and $EDITOR hasn't been relevant in decades, since line-mode terminals
(emulating or actually using paper for output) went out of fashion.

The only thing I found in POSIX is that mailx invokes $VISUAL (falling
back to vi) for the "visual" command, and $EDITOR (falling back to ed
on XSI-conformant systems) for the "edit" command.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */

Re: Command line editing mode

<slrntmffmc.2fsn.naddy@lorvorc.mips.inka.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5819&group=comp.unix.shell#5819

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: naddy@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sun, 6 Nov 2022 14:03:56 -0000 (UTC)
Message-ID: <slrntmffmc.2fsn.naddy@lorvorc.mips.inka.de>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<QlKWBI9CVK3MqO0zc@bongo-ra.co>
Injection-Date: Sun, 6 Nov 2022 14:03:56 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="81816"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Sun, 6 Nov 2022 14:03 UTC

On 2022-11-05, Spiros Bousbouras <spibou@gmail.com> wrote:

> Yes , I use vi mode for all command line editing because I know it well
> and find it natural including the mode model although in command line
> it annoys me a bit that I don't get visual confirmation on which mode
> I'm in. I can't imagine why one would use one set of keys (combinations)
> for file editing and a very different one for command line editing.

Uhmm... historically grown? When I started with computers,
WordStar-compatible editors were all the rage. For a while I used
(a clone of) the UCSD p-System editor, which btw is a lot more modal
than vi. Eventually I found MicroEmacs. When I gained access to
Unix, shells with Emacs-style command line editing were already
standard, so I used that. Emacs or MicroEmacs themselves however
were less widely available on the university machines, and so I had
to learn vi. Eventually I mostly stayed with vi as text editor:
universally available, good enough for me. For the command line I
never had a reason to switch away from Emacs style. *shrug*

Now that I think about it, one advantage of vi mode is that you
don't need to fight screen(1) or tmux(1) over ^A or ^B or such.

Oddly enough, the latest editor I started using on some occasions
has been... ed(1).

I have never used TECO, or EDT, or strange Lisp editors that were
rumored to exist.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

Re: Command line editing mode

<20221106071708.627@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5820&group=comp.unix.shell#5820

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sun, 6 Nov 2022 15:17:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <20221106071708.627@kylheku.com>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<QlKWBI9CVK3MqO0zc@bongo-ra.co>
<slrntmffmc.2fsn.naddy@lorvorc.mips.inka.de>
Injection-Date: Sun, 6 Nov 2022 15:17:50 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="023d4a5637e31a12e61a134575704448";
logging-data="3347242"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181pQRqk5VL6lRQV2CsTjSRhQPl7QPY1/8="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:DkieK9wxv3oZKmczkAEtXAVZ96M=
 by: Kaz Kylheku - Sun, 6 Nov 2022 15:17 UTC

On 2022-11-06, Christian Weisgerber <naddy@mips.inka.de> wrote:
> Now that I think about it, one advantage of vi mode is that you
> don't need to fight screen(1) or tmux(1) over ^A or ^B or such.

Or serial line XON/XOFF over ^S, ^Q.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal

Re: Command line editing mode

<878rknlw0o.fsf@nosuchdomain.example.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5821&group=comp.unix.shell#5821

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode
Date: Sun, 06 Nov 2022 11:31:51 -0800
Organization: None to speak of
Lines: 16
Message-ID: <878rknlw0o.fsf@nosuchdomain.example.com>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<QlKWBI9CVK3MqO0zc@bongo-ra.co>
<slrntmffmc.2fsn.naddy@lorvorc.mips.inka.de>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="3509a1ccaa8abfb27016cb3d4a090b49";
logging-data="3451568"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DlomfVHfioNqqu20y7RxK"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:HagXtkC4XExQ7SskeLXAVRj/GVs=
sha1:mQMY+xD0XpaKniP2OjHHty1kxBk=
 by: Keith Thompson - Sun, 6 Nov 2022 19:31 UTC

Christian Weisgerber <naddy@mips.inka.de> writes:
[...]
> Now that I think about it, one advantage of vi mode is that you
> don't need to fight screen(1) or tmux(1) over ^A or ^B or such.

That's why I map my tmux prefix character to the null character:
set -g prefix 'C-@'
or in GNU screen:
escape ^@^@

It can be entered with Ctrl-Space.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */

Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)

<6fen3j-l1b.ln1@ID-313840.user.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5822&group=comp.unix.shell#5822

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: geoff@clare.See-My-Signature.invalid (Geoff Clare)
Newsgroups: comp.unix.shell
Subject: Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command
line editing mode)
Date: Mon, 7 Nov 2022 13:40:22 +0000
Lines: 30
Message-ID: <6fen3j-l1b.ln1@ID-313840.user.individual.net>
References: <tjhrk0$37g49$1@dont-email.me> <20221028182456.668@kylheku.com>
<tjiu05$3e9u7$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<tk4i8j$25bfa$1@dont-email.me> <tk5q0v$2g19o$1@dont-email.me>
<HdId43NmZ3boaKsDB@bongo-ra.co>
Reply-To: netnews@gclare.org.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net LvXEGxH29iYxYCjA7av9+QtcFOJ8Hf1wWf51Vq0Mm7Tm7PIVOE
X-Orig-Path: ID-313840.user.individual.net!not-for-mail
Cancel-Lock: sha1:8KN/J47qRdu2ZnDN5ntY6IewSWc=
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
 by: Geoff Clare - Mon, 7 Nov 2022 13:40 UTC

Spiros Bousbouras wrote:

> A frustration I have with command line editing is that there is no
> search i.e. / and ? don't seem to work. The reason I would find
> search useful is that sometimes it is the quickest way to specify a
> point in the text because with things like f<some-char> or
> t<some-char> there may be too many of <some-char> to see with a
> quick look which number I should choose. Whereas with / and ? you
> can give a longer sequence. This serves me well with file editing but I
> don't know of an analog for command line editing. Obviously I can issue
> the edit-and-execute-command command and start an actual vim instance.

Within a line it works in ksh93 but not in bash (at least not the way
I would expect). You have to remember that search directions are
reversed for command history.

So, in ksh93 I can move the cursor to some text that occurs later on the
line I'm on by using:

?text

Bash seem to find the text in the line I'm on, but moves the cursor
to the start of the line instead of the found text.

Like you I would normally hit "v" to edit the line with vi when I want
to do this (so that the search directions work normally, and it works
in bash).

--
Geoff Clare <netnews@gclare.org.uk>

Re: Command line editing mode (was: Is 'cd -' to be considered (in ksh, bash) deprecated for scripting?)

<osen3j-l1b.ln1@ID-313840.user.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=5823&group=comp.unix.shell#5823

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: geoff@clare.See-My-Signature.invalid (Geoff Clare)
Newsgroups: comp.unix.shell
Subject: Re: Command line editing mode (was: Is 'cd -' to be considered (in
ksh, bash) deprecated for scripting?)
Date: Mon, 7 Nov 2022 13:47:36 +0000
Lines: 11
Message-ID: <osen3j-l1b.ln1@ID-313840.user.individual.net>
References: <tjhrk0$37g49$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<eli$2211042214@qaz.wtf>
Reply-To: netnews@gclare.org.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Sx7463yweuW/Gjagzq+tOwHoEABS78Z2W5hLJR82diJA2ArXNq
X-Orig-Path: ID-313840.user.individual.net!not-for-mail
Cancel-Lock: sha1:M6upMAx/IbkOF5IdF7V5F0uNwK4=
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
 by: Geoff Clare - Mon, 7 Nov 2022 13:47 UTC

Eli the Bearded wrote:

> Once you think in vi, which I fully get that some people neither can nor
> want to, it's not strange at all. Strange is not being able to use vi
> mode edits on the : line within vi

You can in nvi, and I do it quite a lot. One of the extensions over
historical vi that nvi got right and vim got wrong IMO.

--
Geoff Clare <netnews@gclare.org.uk>

Re: Command line editing mode (was: Is 'cd -' to be considered (in ksh, bash) deprecated for scripting?)

<7385a32a-ec3a-421f-aa0f-e4f3472783f2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=6107&group=comp.unix.shell#6107

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:622a:1a83:b0:3e6:8f86:f55f with SMTP id s3-20020a05622a1a8300b003e68f86f55fmr1257176qtc.4.1681319343593;
Wed, 12 Apr 2023 10:09:03 -0700 (PDT)
X-Received: by 2002:a05:6808:49:b0:387:1afd:5924 with SMTP id
v9-20020a056808004900b003871afd5924mr4457314oic.8.1681319343367; Wed, 12 Apr
2023 10:09:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Wed, 12 Apr 2023 10:09:03 -0700 (PDT)
In-Reply-To: <osen3j-l1b.ln1@ID-313840.user.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:e82:d400:e5cb:ec4d:b7d7:1ca6;
posting-account=rR5tnAoAAAC2kIBHWh0n6frMCTGowyvE
NNTP-Posting-Host: 2600:1700:e82:d400:e5cb:ec4d:b7d7:1ca6
References: <tjhrk0$37g49$1@dont-email.me> <eli$2210291718@qaz.wtf>
<tjk805$3ndt9$1@dont-email.me> <87h6zeed5g.fsf_-_@axel-reichert.de>
<eli$2211042214@qaz.wtf> <osen3j-l1b.ln1@ID-313840.user.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7385a32a-ec3a-421f-aa0f-e4f3472783f2n@googlegroups.com>
Subject: Re: Command line editing mode (was: Is 'cd -' to be considered (in
ksh, bash) deprecated for scripting?)
From: jalenq81@gmail.com (Jalen Q)
Injection-Date: Wed, 12 Apr 2023 17:09:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 13
 by: Jalen Q - Wed, 12 Apr 2023 17:09 UTC

On Monday, November 7, 2022 at 8:11:08 AM UTC-6, Geoff Clare wrote:
> Eli the Bearded wrote:
>
> > Once you think in vi, which I fully get that some people neither can nor
> > want to, it's not strange at all. Strange is not being able to use vi
> > mode edits on the : line within vi
> You can in nvi, and I do it quite a lot. One of the extensions over
> historical vi that nvi got right and vim got wrong IMO.
>
> --
> Geoff Clare <net...@gclare.org.uk>
dffffffffdfdfrdr


devel / comp.unix.shell / Re: [OT] Vi-editor-modes in [ksh] vi-mode editing (was Re: Command line editing mode)

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor