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?)
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.
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 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.)
[...]
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:[...]
It does, and I didn't know about it either. "gq" followed by aThe 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?)
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 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:[...]
It does, and I didn't know about it either. "gq" followed by aThe 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?)
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
"""
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.
Joerg Mertens <joerg-mertens@t-online.de> writes:
Daniel Cerqueira <dan.list@lispclub.com> writes:
Lumin Etherlight <lumin+usenet@etherlight.link> writes:Daniel wrote that he uses a program called "par" to format his texts.
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? :-) .
[...]
[...]
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.
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.
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?)
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 54:15:01 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,453 |