And like hitest, it may be time for me to use vi enough to actually learn it, even if I now better know how to use nano.
TKS

Interesting morning. Ran a little experiment and re-installed an OpenBSD 6.5 system and forced myself to mostly use vi for initial set-up. I did some reading yesterday to re-familiarize myself with basic usage of vi (command and insert modes, and how to save). I was able to successfully use vi to edit pf.conf, create a new doas.conf file, and create a new /etc/hostname.iwn0 file.
I still do like to use sudo occasionally, but , ran into trouble trying to edit my existing /etc/sudoers file. I did what was suggested and could not save the file?! Did the remaining files with nano. That was odd. I have more to learn about vi. Enjoyable and frustrating.

Addition: Spent the afternoon and evening tinkering with vi. I am a bit more comfortable with vi.

__________________
hitest

Last edited by hitest; 19th May 2019 at 04:19 AM.
Reason: Addition- added hours later

I use the ee text editor. It comes standard with FreeBSD. I know you need to installl it as a package or from the ports tree, so that ED Mastery book suggested maybe a better place to start, unless you need to use some GNU/Linux distro that doesn't have it installed by default anymore. I wish the OpenBSD communal packages came with the more advanced text editor based on ee, ie. aee or I think its xae for GUI interfaces, (its a long time since I have used FreeBSD).
As far as doas.conf is concerned, the Author inside the man page is Ted Unagast (have I spelled his name correctly?). Anyway, search for his doas pamphlet mastery webpage with Chromium, it doesn't seem to work with other web browsers, get security certificate errors with Firefox and Lynx I think. But his document is not too long but covers the essentials. Its getting a bit old, so some of the contents may need updating - ie. the OP that replied to you said you might have found a bug.

I use the ee text editor. It comes standard with FreeBSD. I know you need to installl it as a package or from the ports tree, so that ED Mastery book suggested maybe a better place to start, unless you need to use some GNU/Linux distro that doesn't have it installed by default anymore. I wish the OpenBSD communal packages came with the more advanced text editor based on ee, ie. aee or I think its xae for GUI interfaces, (its a long time since I have used FreeBSD).

I manage the editors/ee package. I also have a (never committed) port of aee (which comes with xae). Never thought anyone would want it but I can put it in if people do.

I'm starting to get comfortable with simple vi commands. I had a look at the ed wikipedia entry; it appears daunting.
I'm glad that you like ed.

Those poor wiki people just never had a good ed teacher. Vi is ed plus many more commands piled on top. So vi is more work to learn than ed. Ed is the simplest no mouse editor ever made. It has only what you need to edit text, and nothing that you don't need. Let the editor wars begin!

But seriously, the only part that is work to learn is editing a line with basic regular expressions. You will have to become one with them to become fast. I have never been good with re because I rarely had a need for them, but ed makes me use them every day so eventually it will become automatic.

What made me curious about ed was I once came across a comment by a writer who said he learned ed to help him beat writer's block. He said ed makess him focus on the line he is editing, so he is no longer distracted by the surrounding text. I became interested in it because I realized the way an editor is designed can make your mind work in a different way.

I use ed(1) for specific tasks only. I find it particularly useful for adding new line characters to markup languages such as html or xml. And I use it in situations where no other editor is available. And sometimes in scripts.

But my use excludes regular expressions. Even though there's a large chapter on the use of them in Ed Mastery, and I've gone through the exercises. Several times.

Location: hot,dry,dusty,rainy,windy,straight winds, tornado,puts the fear of God in you-Texas

Posts: 185

My 2 cents..........
"ed" of course has its roots based in the development of the Unix OS.

Back in the day (mid to late 80's and early 90's) it was the only way to edit what you might consider .conf or batch files on certain IBM (Tm) mainframes as used in the Nuclear Power Plant Simulation Industry.
Following a short learning curve (being a paid consultant ) I found "ed" in this particular usage an exceptional well suited tool. Since simulation involves the monitoring, calculation, display of many variables, "ed" facilitated exact methods to alter these files to inject failure of various degree affecting simulation. As stated earlier by a previous poster it allows mental concentration on a line by line basis allowing one to focus on the technical requirements of that line. Since "ed" was the only "line editor" provided on the mainframe it was the "only" game in town. Would I have preferred another editor for this purpose?, given the technology at the time probably not. And of course in the end it didn't matter as it was the only tool provided.

Today I have greatly reduced needs for editing files. Therefore I use nano daily for .conf files and geany when fooling around with "freebasic" . Since some of you have experienced problems with .conf file editing using nano I scrutinize those files closer when using nano or if I experience problems can manage them using vi or ed.

In the end what editor or processor you choose is normally driven by convenience and suitability
and of course personal choice.

Last edited by frcc; 24th June 2019 at 09:19 PM.
Reason: clarify and correct