[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Detailed Leafpad manual [not just manpage]?



On Tuesday, December 06, 2022 07:01:07 AM Richard Owlett wrote:
> I just tried it on both of my machines.
> It lacks ability to set the right margin. I want to insert a paragraph
> such that the effective LEFT margin [when line wraps at RIGHT margin] is
> the indent level.

I started to write a rather long reply and ran out of time / ambition.

One question I'd ask -- are you using what is sometimes called dynameic / 
soft) wrapping (long lines are (soft) wrapped to appear as paragraphs and 
dynamically readjust as you modify the line), or hard wrapping (long lines are 
broken into shorter lines (to appear as paragraphs) by adding "hard" line 
ends.  (Editors (or options) to do the hard wrapping typically have a command 
to readjust the position of those "hard" line ends.)

I think soft wrapping is much more user friendly for text that might include 
paragraphs.

Aside: currently I use the kde editors kwrite and kate (for slightly different 
purposes), and I've written what I'll call a lexer (not what kde calls it) to 
highlight and fold (that is not word wrap, but folding to hide text to show 
just the first line or such of a paragraph when an outline (or portion thereof) 
is collapsed.

There are / have been a few problems with kate and kwrite (including a bug 
(that bugged me -- because of it I have to add ending markup to things I 
write) -- the bug persisted for something like 10 years, but even after they 
claimed it was fixed, in a very superficial attempt at testing, It didn't seem 
to work.

My current plan is to eventually switch to an editor that uses scintilla as 
the editor component.  There are quite a few such editors (I once saw a list 
that might have listed almost 100 editors, at various levels of completion (or 
intention).

Scite (as recommended by someone else), is one of those, as are Geany, 
something named something like Notepad (it seems there are several things 
named with some variation of "Notepad") and several others.

The stumbling block for me is writing a suitable lexer for Scintilla -- a 
"native" scintilla lexer is written in C++ which I just have a terrible time 
grokking.  (Lexers can also be written in Lua or in fact any language (for an 
external lexer), but all of those are harder to integrate to be used in all 
the editors which use scintilla.

Nevertheless, I'd encourage you to consider an editor based on Scintilla 
(e.g., Scite, Geany, Notepad <something>), or kate or kwrite.

Aside: I understand there is a way to install kate / kwrite without installing 
all of kde -- I've never tried it, I'm sure that some libraries and such must 
be installed in addition to the kate and kwrite executables.

And, if you're writing a lot of text (vs. code) I'd encourage you to learn 
(and use) soft wrapping and what Microsoft calls (used to call) "collapsible 
outlining" (which is more commonly known as folding in the Linux world).

Aside: "Folding" is overloaded in the Linux world -- it is sometimes used to 
describe line wrapping and other times for collapsible outlining.

Have fun!



-- 
rhk

If you reply: snip, snip, and snip again; leave attributions; avoid HTML; 
avoid top posting; and keep it "on list".  (Oxford comma included at no 
charge.)  If you change topics, change the Subject: line. 

Writing is often meant for others to read and understand (legal agreements 
excepted?) -- make it easier for your reader by various means, including 
liberal use of whitespace and minimal use of (obscure?) jargon, abbreviations, 
acronyms, and references.

If someone else has already responded to a question, decide whether any 
response you add will be helpful or not ...

A picture is worth a thousand words -- divide by 10 for each minute of video 
(or audio) or create a transcript and edit it to 10% of the original.


Reply to: