Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.shell > #26916
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Newsgroups | comp.unix.shell |
| Subject | Re: ed __ ___ ________ ____ ______. |
| Date | 2026-06-13 00:58 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <110i2ui$2097u$3@dont-email.me> (permalink) |
| References | (5 earlier) <110a7l1$b2kq$6@kst.eternal-september.org> <110dl7a$1nauc$4@dont-email.me> <110f6f8$1nfih$2@kst.eternal-september.org> <110h6mi$2097v$1@dont-email.me> <110i0rn$2g518$5@kst.eternal-september.org> |
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
Back to comp.unix.shell | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ed __ ___ ________ ____ ______. Zayd Mohammed <zaydm@172.24.208.1> - 2026-06-08 02:16 +0000
Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-08 04:46 +0200
Re: ed __ ___ ________ ____ ______. cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 13:44 +0000
Re: ed __ ___ ________ ____ ______. gazelle@shell.xmission.com (Kenny McCormack) - 2026-06-08 14:12 +0000
Re: ed. cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 19:30 +0000
Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-08 14:40 -0700
Re: ed __ ___ ________ ____ ______. groenveld@acm.org (John D Groenveld) - 2026-06-09 00:04 +0000
Re: ed __ ___ ________ ____ ______. Adam Sampson <ats@offog.org> - 2026-06-09 01:50 +0100
Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-09 16:47 +0200
Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-09 16:41 -0700
Re: ed __ ___ ________ ____ ______. Ben Collver <bencollver@tilde.pink> - 2026-06-09 14:27 +0000
Re: ed __ ___ ________ ____ ______. Eric Pozharski <apple.universe@posteo.net> - 2026-06-08 22:28 +0000
Re: ed __ ___ ________ ____ ______. Lumin Etherlight <lumin+usenet@etherlight.link> - 2026-06-09 03:25 +0300
Re: ed __ ___ ________ ____ ______. Daniel Cerqueira <dan.list@lispclub.com> - 2026-06-09 09:47 +0100
Re: ed __ ___ ________ ____ ______. Joerg Mertens <joerg-mertens@t-online.de> - 2026-06-09 15:53 +0200
Re: ed __ ___ ________ ____ ______. Daniel Cerqueira <dan.list@lispclub.com> - 2026-06-09 21:00 +0100
Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-09 16:29 -0700
Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 08:39 +0200
Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-11 13:40 -0700
Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-12 16:56 +0200
Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-12 15:22 -0700
Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-13 00:58 +0200
Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-09 17:57 +0200
Re: ed __ ___ ________ ____ ______. John McCue <jmclnx@gmail.com.invalid> - 2026-06-08 22:57 +0000
Re: ed __ ___ ________ ____ ______. Lumin Etherlight <lumin+usenet@etherlight.link> - 2026-06-09 03:02 +0300
Re: ed __ ___ ________ ____ ______. gmc@metro.cx (Koen Martens) - 2026-06-09 06:17 +0000
Re: ed __ ___ ________ ____ ______. Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-09 06:55 +0000
Re: ed __ ___ ________ ____ ______. John McCue <jmclnx@gmail.com.invalid> - 2026-06-09 19:44 +0000
Re: ed __ ___ ________ ____ ______. Top Dead Ctr <tdc@invalid.invalid> - 2026-06-09 14:09 -0600
Re: ed __ ___ ________ ____ ______. Christian Weisgerber <naddy@mips.inka.de> - 2026-06-09 23:52 +0000
Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-10 00:40 +0000
Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-10 00:38 +0000
Re: ed John McCue <jmclnx@gmail.com.invalid> - 2026-06-10 22:01 +0000
Re: ed Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-10 16:43 -0700
Re: ed Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-10 16:50 -0700
Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-10 23:53 +0000
Re: ed Eli the Bearded <*@eli.users.panix.com> - 2026-06-11 00:12 +0000
Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-11 00:55 +0000
Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-11 02:00 +0000
Re: ed Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-10 19:30 -0700
Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-11 11:31 +0000
Re: ed Christian Weisgerber <naddy@mips.inka.de> - 2026-06-11 15:02 +0000
Re: ed Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 08:46 +0200
Re: ed John McCue <jmclnx@gmail.com.invalid> - 2026-06-11 14:28 +0000
Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-10 23:48 +0000
Re: ed Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-06-11 00:24 +0000
Re: ed John McCue <jmclnx@gmail.com.invalid> - 2026-06-11 14:11 +0000
Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-12 00:22 +0000
Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-11 00:53 +0000
Re: ed Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 09:02 +0200
Re: ed __ ___ ________ ____ ______. Nuno Silva <nunojsilva@invalid.invalid> - 2026-06-10 11:03 +0100
Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 09:12 +0200
Re: ed __ ___ ________ ____ ______. Nuno Silva <nunojsilva@invalid.invalid> - 2026-06-12 09:44 +0100
Android editor (Was: ed __ ___ ________ ____ ______.) gazelle@shell.xmission.com (Kenny McCormack) - 2026-06-12 09:03 +0000
Re: Android editor Nuno Silva <nunojsilva@invalid.invalid> - 2026-06-12 12:01 +0100
csiph-web