Web lists-archives.com

Re: text editors

On Mon, Mar 25, 2019 at 04:38:31AM +0000, mick crane wrote:
> Is there any text editor, preferably in a terminal that has the
> facility to protect lines in the document, not the document itself ?
> I've got 2 blocks of "code" that look similar and I keep editing the
> wrong one and then it doesn't work.
> mick

What is "the document"? And what format is it in?

I have the strong suspicion that the answer to the first would be
"a configuration file of some sort" and to the second, it might
be "plain text".

In that case, I guess the straight answer to your question above
is "no".

And with the possibility that, perhaps, this (hypothetical) editor
won't be the only interface to your file, it might be wise to
consider another angle from which to attack the problem. A version
control system which allows you to easily revert to a previous
version of your file should anything go wrong. Or a post-commit
script charged of ensuring certain constraints before "activating"
your new version of the file (cf. visudo for inspiration). Just
two examples to perhaps get you started.

You can nevertheless get every civilised editor to do the trick
(vim, Emacs will easily comply) -- but perhaps you won't be
solving your problem...

-- t

Attachment: signature.asc
Description: Digital signature