• Re: ed __ ___ ________ ____ ______.

    From Keith Thompson@Keith.S.Thompson+u@gmail.com to comp.unix.shell on Thu Jun 11 13:40:08 2026
    From Newsgroup: comp.unix.shell

    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    On 2026-06-10 01:29, Keith Thompson wrote:
    [...]
    The par program by default does not format text the way
    Lumin Etherlight does. They might be using par with options.
    "par -j" formats paragraphs by inserting spaces so the text is
    right-justified. "par -j -w50" does the same, but with 50-character
    lines. I don't see an option to insert two leading spaces on
    each line.

    (I'm a bit astonished that Vim doesn't natively support that. -
    Or does it, and I just don't know about it?)

    It does, and I didn't know about it either. "gq" followed by a
    motion command formats text, possibly using a configured external
    program. ":help gq" in vim for more information. (I've been using
    key mappings to invoke "fmt" since before I'd even heard of vim.)

    Personally, I find Lumin's formatting distracting. For fixed-width
    characters, right-justifying text by inserting blanks makes the text
    more difficult to read, IMHO with no real benefit. (It tends to work
    better with variable-width fonts.) Leading spaces typically denote
    quoted text; adding using them on original text is unconventional,
    and therefore distracting. 50 or 52 columns is much narrower than
    most articles, which I also find distracting. (I use 70 or so,
    typically via "fmt -w 70" or the equivalant "fmt -70".)
    Lumin's formatting is clever. Clever is not always good.

    I agree with most of what you say. And especially concerning the right-alignment with spurious spaces. (The indent I think is only
    mildly annoying; usually you can identify the indent-level by the
    number of '>'.) Narrower line-lengths (50-76) is okay for me; I
    find the (widespread!) use of using no line-length limits at all
    to be the much more annoying formatting habit.

    Indentation is commonly used to mark text quoted from a source other
    than the parent article (at least I do that). It's also sometimes
    used for code samples.
    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Nuno Silva@nunojsilva@invalid.invalid to comp.unix.shell on Fri Jun 12 09:44:56 2026
    From Newsgroup: comp.unix.shell

    On 2026-06-11, Janis Papanagnou wrote:

    On 2026-06-10 12:03, Nuno Silva wrote:
    On 2026-06-09, Koen Martens wrote:

    Zayd Mohammed <zaydm@172.24.208.1> wrote:
    ed is the standard text editor.

    Ed made sense when your only way to interact with a system
    was through a line printer (such as a DECwriter), but when
    terminals with a screen and a cursor were invented, it was
    rapidly supplanted by more usable editors.

    ed *is* usable, let's stop this "there are bigger/different programs
    available so it has no use now" nonsense, shall we?

    If we're going to put ed in that bag, sed should go there too, I
    guess. After all, some such "more usable editors" can "replace" sed...

    (And if you claim sed is different because it can be used in
    automation... can't ed be used that way too?)

    This all reminds me the "If all I have is a hammer..." allegory.


    Yes, with 'sed' or 'vi' I'm doing different things than with 'ex'
    (or 'ed').

    I use Emacs, sed, ed frequently. The first more than the others, but
    this really is like having a set of screwdrivers and picking a somewhat appropriate one for each screw.



    On a smartphone, I've also finally found a good text editor for Android,
    it's quite extensible and configurable and for the first time I don't
    end up wishing it had some Emacs feature every time I use it.
    --
    Nuno Silva
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.unix.shell on Fri Jun 12 16:56:18 2026
    From Newsgroup: comp.unix.shell

    On 2026-06-11 22:40, Keith Thompson wrote:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    On 2026-06-10 01:29, Keith Thompson wrote:
    [...]
    The par program by default does not format text the way
    Lumin Etherlight does. They might be using par with options.
    "par -j" formats paragraphs by inserting spaces so the text is
    right-justified. "par -j -w50" does the same, but with 50-character
    lines. I don't see an option to insert two leading spaces on
    each line.

    (I'm a bit astonished that Vim doesn't natively support that. -
    Or does it, and I just don't know about it?)

    It does, and I didn't know about it either. "gq" followed by a
    motion command formats text, possibly using a configured external
    program. ":help gq" in vim for more information. (I've been using
    key mappings to invoke "fmt" since before I'd even heard of vim.)

    Oh, I obviously was unclear. - I had been talking about the
    left-and-right block-alignment; the format we saw in Lumin's post.

    'fmt' does *not* support that functionality. But 'par' *does*.

    Both can be used from within Vi or Vim with its _external filter_
    interface. But both are not *natively* supported in Vi. And 'gq'
    in Vim supports *native* formatting like 'fmt', but not like 'par'.

    You can also configure external commands. But my question was about
    a "native" support; because I like editing functions independent
    of environmental support, and I don't like plugins (which would be
    another options for those who think plugins are a good idea).

    Janis

    [...]

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Keith Thompson@Keith.S.Thompson+u@gmail.com to comp.unix.shell on Fri Jun 12 15:22:47 2026
    From Newsgroup: comp.unix.shell

    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    On 2026-06-11 22:40, Keith Thompson wrote:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    On 2026-06-10 01:29, Keith Thompson wrote:
    [...]
    The par program by default does not format text the way
    Lumin Etherlight does. They might be using par with options.
    "par -j" formats paragraphs by inserting spaces so the text is
    right-justified. "par -j -w50" does the same, but with 50-character
    lines. I don't see an option to insert two leading spaces on
    each line.

    (I'm a bit astonished that Vim doesn't natively support that. -
    Or does it, and I just don't know about it?)
    It does, and I didn't know about it either. "gq" followed by a
    motion command formats text, possibly using a configured external
    program. ":help gq" in vim for more information. (I've been using
    key mappings to invoke "fmt" since before I'd even heard of vim.)

    Oh, I obviously was unclear. - I had been talking about the
    left-and-right block-alignment; the format we saw in Lumin's post.

    'fmt' does *not* support that functionality. But 'par' *does*.

    No I don't think you were unclear. I use "fmt" rather than
    "par" because (a) "par" probably didn't exist when I started
    using "fmt" (and I'm not sure "vim" did), and (b) I don't *want* left-and-right-justified text. I'm now aware that vim has a built-in
    feature for formatting paragraphs, but as Darth Vader would say,
    "The intertia is strong with this one".

    Both can be used from within Vi or Vim with its _external filter_
    interface. But both are not *natively* supported in Vi. And 'gq'
    in Vim supports *native* formatting like 'fmt', but not like 'par'.

    You can also configure external commands. But my question was about
    a "native" support; because I like editing functions independent
    of environmental support, and I don't like plugins (which would be
    another options for those who think plugins are a good idea).

    Quoting the vim documentation:
    """
    JUSTIFYING TEXT *justify* *:Justify* *Justify()* *package-justify*

    Vim has no built-in way of justifying text. However, there is a neat macro package that does the job. To use this package, execute the following
    command: >vim

    :packadd justify

    Or put this line in your |vimrc|: >vim

    :packadd! justify
    """
    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.unix.shell on Sat Jun 13 00:58:26 2026
    From Newsgroup: comp.unix.shell

    On 2026-06-13 00:22, Keith Thompson wrote:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    On 2026-06-11 22:40, Keith Thompson wrote:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    On 2026-06-10 01:29, Keith Thompson wrote:
    [...]
    The par program by default does not format text the way
    Lumin Etherlight does. They might be using par with options.
    "par -j" formats paragraphs by inserting spaces so the text is
    right-justified. "par -j -w50" does the same, but with 50-character
    lines. I don't see an option to insert two leading spaces on
    each line.

    (I'm a bit astonished that Vim doesn't natively support that. -
    Or does it, and I just don't know about it?)
    It does, and I didn't know about it either. "gq" followed by a
    motion command formats text, possibly using a configured external
    program. ":help gq" in vim for more information. (I've been using
    key mappings to invoke "fmt" since before I'd even heard of vim.)

    Oh, I obviously was unclear. - I had been talking about the
    left-and-right block-alignment; the format we saw in Lumin's post.

    'fmt' does *not* support that functionality. But 'par' *does*.

    No I don't think you were unclear. I use "fmt" rather than
    "par" because (a) "par" probably didn't exist when I started
    using "fmt" (and I'm not sure "vim" did), and (b) I don't *want* left-and-right-justified text. I'm now aware that vim has a built-in
    feature for formatting paragraphs, but as Darth Vader would say,
    "The intertia is strong with this one".

    Then we were (and probably still are!) talking at cross purposes.

    I had been asking for a built-in 'par' like function; there isn't
    one. (And I thought you had been trying to support my request with
    the hints to 'fmt' in your post. - So *I* probably misinterpreted
    your post as being an answer to my question.)

    I also don't like block-formatting for posts. But it's useful for
    specific purposes, and since it's an common editing/presentation
    task it should (as Vim's 'gq') be a Vim built-in, in my opinion.

    ('gq' I'm actually using with Vim already for a very long time.
    It's very useful and easy to type and use.)


    Both can be used from within Vi or Vim with its _external filter_
    interface. But both are not *natively* supported in Vi. And 'gq'
    in Vim supports *native* formatting like 'fmt', but not like 'par'.

    You can also configure external commands. But my question was about
    a "native" support; because I like editing functions independent
    of environmental support, and I don't like plugins (which would be
    another options for those who think plugins are a good idea).

    Quoting the vim documentation:
    """
    JUSTIFYING TEXT *justify* *:Justify* *Justify()* *package-justify*

    Vim has no built-in way of justifying text.

    Vim has 'gq' formatting natively; see point 3. below (:help gq).

    gq{motion} Format the lines that {motion} moves over.
    Formatting is done with one of three methods:
    1. If 'formatexpr' is not empty the expression is
    evaluated. This can differ for each buffer.
    2. If 'formatprg' is not empty an external program
    is used.
    3. Otherwise formatting is done internally.

    In my standard Vim environment, the settings of 1. and 2. are empty.
    So internal (native) formatting is used.

    However, there is a neat macro
    package that does the job. To use this package, execute the following command: >vim

    :packadd justify

    Or put this line in your |vimrc|: >vim

    :packadd! justify
    """

    Yes, and this is plugin! - I said that I don't like to use plugins.
    I use Vim *natively* with what it comes; it's extremely powerful as
    it is already, and I want to avoid dependencies like external 'par'
    commands or any plugins!

    I've got an answer to my original "native block-formatting question"
    ("Or does it, and I just don't know about it?") also from the Vim
    mailing list:

    There is no built-in command but there is a plugin distributed
    with vim. See ":help justify".

    So I'm fine with my curiosity about that. And we can close the topic
    (at least as far as my question goes). :-)

    Janis

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Daniel Cerqueira@dan.list@lispclub.com to comp.unix.shell on Fri Jul 3 00:55:34 2026
    From Newsgroup: comp.unix.shell

    --=-=-=
    Content-Type: text/plain
    Content-Transfer-Encoding: quoted-printable

    Joerg Mertens <joerg-mertens@t-online.de> writes:

    Daniel Cerqueira <dan.list@lispclub.com> writes:

    Lumin Etherlight <lumin+usenet@etherlight.link> writes:

    Perhaps, better yes. But if one editor is
    worthy of being discussed in comp.unix.shell, it's
    ed, because ed is almost completely useless if not
    for the shell. I spell check in ed by calling to
    a shell program !aspell %, I format the post by
    doing the same !par, when I want a calendar in my
    task file I !cal, etc. etc. Personally, I think
    ed is the only editor that follows the UNIX
    philosophy closely, it applies edits to text, and
    it does so very well.

    When I want to edit text, ed is my shell.

    I love the way your text is formatted. Lumin, how have you formatted
    the text above? :-) .

    I do use GNU Emacs, and I think you made a good argument for 'ed' in me.
    If anyone here know how to format like the text above, but in GNU Emacs,
    I would like to know how.

    Daniel wrote that he uses a program called "par" to format his texts.
    You should be able to use it in emacs, too. Just mark your text and
    type

    C-u M-| par <ENTER>

    assumed "par" is installed on your system.

    Actually, 'par' is not giving good results, so I stopped using it (it
    was recommended to me) and, by contrast, I started using C-u M-q on a
    middle of a paragraph text, to do the job I was trying to achieve with
    'par'.

    M-q is the 'fill-paragraph' function. With a prefix (C-u before the
    call) it justifies and fills the paragraph.

    =2D-=20
    A little Consideration, a little Thought for Others, makes
    all the difference. ~ Alan Alexander Milne

    --=-=-=
    Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJmBAEBCgBQFiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmpG+nYbFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyFhxkYW4ubGlzdEBsaXNwY2x1Yi5jb20ACgkQlk/B EMQK1XWAQxAAjAyy9y2TjhAOvAWgXUYLa3N8gdzCx6zPEa5btPD5g0XaxQaF59BU PabCPER53dwXH2IdTX/jVszuLCuPyks3ILvz8VR2WTkb5zBa2OS7zLg4ZoV9rYmX Ft30OCg3k7qA9w4rNIskVUi74UbBRJ7SS71ukr+SxCXk8DUwwEYCG7HmOOqvMOok LusGdUZ5/T2v1u32L/Aj+6G1StVS1kygGRws2MFkFOq88fv1vzSs3079D3u9uUDC DIhYhyq108T5jYwm8uf/wTHiPBJS5j+XSaWUrylSUfl0vISCu6TCZ8HvkbsGBT5G YB6f0SVBd0hbEY1tj464DqGwm3C4TS1YXHiPWnKzQiIcT96Oy6q5An9YGHxRI23U UispZ4HrqEyLXEMVm9VuhDHYOhw2Ugy6HIPcG8ehNy+oCPZquM3kN7sGNyE/TJjc E1JlP4+9f6uWvCE5160lZgevRl3x4B1nK9wq0qzxu5hcXz6uytW1KYz4llI1vGOY hk/XthxLKHW4CTD3VUQXGQPpDDEfxw5tlUfDF3N99NkGzeei4gkucsh9j6fLJal0 CaV7Haos/5bce/k3/GaJKbsF49VgS3T6Kqjfk4um1hDG98tJ+Q6w2D1/TY5ikREO Fs3eYkaULNVWaPR0ReAUhHEG/1ITWMJnZgk9Hh/1NmrcdZk70fNGm0w=
    =Gkbr
    -----END PGP SIGNATURE-----
    --=-=-=--
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Keith Thompson@Keith.S.Thompson+u@gmail.com to comp.unix.shell on Thu Jul 2 20:30:29 2026
    From Newsgroup: comp.unix.shell

    Daniel Cerqueira <dan.list@lispclub.com> writes:
    [...]
    Actually, 'par' is not giving good results, so I stopped using it (it
    was recommended to me) and, by contrast, I started using C-u M-q on a middle of a paragraph text, to do the job I was trying to achieve with 'par'.

    M-q is the 'fill-paragraph' function. With a prefix (C-u before the call) it justifies and fills the paragraph.

    And the result is that your paragraphs have extra spaces inserted
    just to make the text both left- and right-justified.

    My advice is to drop the prefix and fill the paragraphs *without* right-justifying them. Right-justified lines are fine with
    variable-width fonts, but with fixed-width fonts I find them
    distracting and unhelpful. (Note that you are almost the only
    person who posts like this.)

    I know I've mentioned this before. I'm not planning to do so again.
    And thank you for left-justifying your text.
    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.unix.shell on Thu Jun 11 08:39:38 2026
    From Newsgroup: comp.unix.shell

    On 2026-06-10 01:29, Keith Thompson wrote:
    Joerg Mertens <joerg-mertens@t-online.de> writes:
    Daniel Cerqueira <dan.list@lispclub.com> writes:
    Lumin Etherlight <lumin+usenet@etherlight.link> writes:

    Perhaps, better yes. But if one editor is
    worthy of being discussed in comp.unix.shell, it's
    ed, because ed is almost completely useless if not
    for the shell. I spell check in ed by calling to
    a shell program !aspell %, I format the post by
    doing the same !par, when I want a calendar in my
    task file I !cal, etc. etc. Personally, I think
    ed is the only editor that follows the UNIX
    philosophy closely, it applies edits to text, and
    it does so very well.

    When I want to edit text, ed is my shell.

    I love the way your text is formatted. Lumin, how have you formatted
    the text above? :-) .
    [...]
    Daniel wrote that he uses a program called "par" to format his texts.
    [...]

    The par program by default does not format text the way
    Lumin Etherlight does. They might be using par with options.
    "par -j" formats paragraphs by inserting spaces so the text is right-justified. "par -j -w50" does the same, but with 50-character
    lines. I don't see an option to insert two leading spaces on
    each line.

    (I'm a bit astonished that Vim doesn't natively support that. -
    Or does it, and I just don't know about it?)


    Personally, I find Lumin's formatting distracting. For fixed-width characters, right-justifying text by inserting blanks makes the text
    more difficult to read, IMHO with no real benefit. (It tends to work
    better with variable-width fonts.) Leading spaces typically denote
    quoted text; adding using them on original text is unconventional,
    and therefore distracting. 50 or 52 columns is much narrower than
    most articles, which I also find distracting. (I use 70 or so,
    typically via "fmt -w 70" or the equivalant "fmt -70".)

    Lumin's formatting is clever. Clever is not always good.

    I agree with most of what you say. And especially concerning the right-alignment with spurious spaces. (The indent I think is only
    mildly annoying; usually you can identify the indent-level by the
    number of '>'.) Narrower line-lengths (50-76) is okay for me; I
    find the (widespread!) use of using no line-length limits at all
    to be the much more annoying formatting habit.

    Janis

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.unix.shell on Thu Jun 11 09:12:46 2026
    From Newsgroup: comp.unix.shell

    On 2026-06-10 12:03, Nuno Silva wrote:
    On 2026-06-09, Koen Martens wrote:

    Zayd Mohammed <zaydm@172.24.208.1> wrote:
    ed is the standard text editor.

    Ed made sense when your only way to interact with a system
    was through a line printer (such as a DECwriter), but when
    terminals with a screen and a cursor were invented, it was
    rapidly supplanted by more usable editors.

    ed *is* usable, let's stop this "there are bigger/different programs available so it has no use now" nonsense, shall we?

    If we're going to put ed in that bag, sed should go there too, I
    guess. After all, some such "more usable editors" can "replace" sed...

    (And if you claim sed is different because it can be used in
    automation... can't ed be used that way too?)

    This all reminds me the "If all I have is a hammer..." allegory.


    Yes, with 'sed' or 'vi' I'm doing different things than with 'ex'
    (or 'ed').

    Janis

    --- Synchronet 3.22a-Linux NewsLink 1.2