# What is your favorite text editor?



## -Snake- (Jan 25, 2018)

I would like to know which text editor you use in FreeBSD, I like vim very much to program, for very simple things I usually use nano.

Which one is your favorite?

PD: This does not try to be a flame "emacs vs vim" just a nice debate.


----------



## dodona (Jan 25, 2018)

I'm running a somewhat stripped down vim mostly for editing tasks, for the more complex ones I run emacs, and for some special editing jobs ed or se.


----------



## SirDice (Jan 25, 2018)

I've forced myself to learn vi(1). One of the major reason is that it's typically the only editor that's available on different Unix(-like) systems. So it's quite useful to know at least some of the basic editing commands. Now I'm starting to really enjoy vi(1) and vim(1). Muscle memory has gotten so bad I have many MS Word documents with :wq sporadically appearing in the middle of a page


----------



## balanga (Jan 25, 2018)

The one I use most is the editor built into midnight commander, mcedit. I keep thinking I should learn emacs, but it seems very complicated, and what I do most with an editor is copy and paste a few lines in various configuration files. The frustrating thing about mcedit is that I can't find a way of copying lines onto the clipboard. Pasting works normally.


----------



## kpedersen (Jan 25, 2018)

I use "tvi". Yeah basically a shell script running vi(1) in a separate tmux(1) window 


```
tmux new-window -n `basename "$1"` vi "$1"
```

And then to copy between buffers I use this hacky vi(1) mapping in my .exrc:


```
map ^Y mt:'m,'t w! ~/.ex_yank^M
map ^P :read ~/.ex_yank^M
```

Who said vi(1) isn't scriptable?


----------



## -Snake- (Jan 25, 2018)

SirDice said:


> I've forced myself to learn vi(1). One of the major reason is that it's typically the only editor that's available on different Unix(-like) systems. So it's quite useful to know at least some of the basic editing commands. Now I'm starting to really enjoy vi(1) and vim(1). Muscle memory has gotten so bad I have many MS Word documents with :wq sporadically appearing in the middle of a page



The reason why I was most interested in vi / vim was just that! vi is pre-installed on any unix-like system. In addition, I really like the simplicity of vim, I prefer to use simple commands like ":wq"

Although I recognize that emacs is very flexible when installing extensions, each has its advantages and disadvantages.


----------



## Cthulhux (Jan 25, 2018)

-Snake- said:


> vi is pre-installed on any unix-like system.



So is `ed`, thanks to POSIX; however, with the rise of Linux, this is _not_ guaranteed anymore. Gentoo, for example, had replaced `vi` by `nano` around 2006, Void Linux comes without `ed` as well.


----------



## Snurg (Jan 25, 2018)

My main editor is Kate.
I like very much that it has block marking mode (toggle between line and block marking modes with ctrl-shift-B).
This is not only useful for copy/pasting, but also for editing.
Try marking a block over a few lines and start typing... just cool 
Other things I like with Kate is that it has sweet window splitting and does not annoy/distract me with "fancy" optics.

When in console, I use vi. But I don't like switching often between vi and Kate, because my muscle memory also has degenerated, like SirDice explained...


----------



## sidetone (Jan 25, 2018)

SirDice said:


> I have many MS Word documents with :wq sporadically appearing in the middle of a page


That on editors/leafpad or ctrl-s for saving on other editors.

emacs is for those who favor ncurses. vi is simply for pure text line editing.


----------



## Datapanic (Jan 25, 2018)

I've always used vi, and if I have to use it on a linux box, the first thing I do is:


```
:syntax off
```


----------



## Snurg (Jan 25, 2018)

Datapanic said:


> ```
> :syntax off
> ```


Thanks! Great tip! These colors are a real pain!


----------



## michael_hackson (Jan 25, 2018)

Joining in on the Gentlemen's Club, using vi. Vim has lured my interest a little but I have made so many other customisations that I haven't looked into vim yet.

"vi stand united" and so on.


----------



## Deleted member 30996 (Jan 25, 2018)

I really like using `ee` to edit from the login terminal, but for practical purposes use editors/leafpad. I can use editors/vim but am a lot quicker and productive with leafpad.

When I write XHTML there is no need to retype what I've already done, and can have 10-12 instances of leafpad to work from open at once with ease.


----------



## geheimnisse (Jan 26, 2018)

I use `vi` 90% of the time. I don't even bother with editors/vim because I don't have a need for it.
For general purpose copy-pasting-etc while in Xorg, I use editors/leafpad.
For coding editors/linux-sublime is very nice.


----------



## Snurg (Jan 26, 2018)

geheimnisse said:


> For coding editors/linux-sublime is very nice.


There is a sublime3 port, but it does not start for some reason, so I tried installing the port you mentioned. That works indeed.
^R is sweet. Should suggest the Kate devs to add such.
However, sublime seems not to have split screen, a feature I cannot live without.

Regarding Kate, this is how it looks just now. When I tried it out first, I didn't think I would like it that much.



 
What I like with Kate too, is that it is the only editor (except of ancient Brief editor) I know of which is able to block mark, cut/copy and paste.
See the blue marked text block below the open menu. This is so convenient!


----------



## ralphbsz (Jan 26, 2018)

When I started using Unixes (about 29 years ago), I came from mainframe experience (on MVS that's ISPF and clones like Wylbur and Newlib,  and on VM Xedit, which were all full-screen editors using the 3277 hardware) and from VMS (meaning edt and eve).  I initially used vi for a few weeks, but the experience was nasty.  I ended up instead ftp'ing files to the VAX and back for editing.  A friend who already had ~10 years of Unix experience recommended this crazy editor that came out of MIT called "emacs", and it's been what I've used for the last several decades.  I still can barely use vi; if I get stuck on a machine without emacs, editing is a big pain to me.

When I had to use Windows for serious programming work, I bought an emacs-emulator called "epsilon".

I've tried various IDEs (like the Borland Java IDE, and then eclipse).  While I see their advantages, I've so far always ended up abandoning them, because they have such crappy editors built in.  The underlying reason for this is probably that I'm very much a keyboard person; having to use a mouse (even a touchpad or the IBM/Lenovo "joystick" mouse) slows me down massively.  This is likely because I've been playing the piano intensely since I was a child, so my fingers are very fast.


----------



## ShelLuser (Jan 26, 2018)

-Snake- said:


> PD: This does not try to be a flame "emacs vs vim" just a nice debate.


Oh yeah, vi or die (it even rhymes somewhat so I got to be right) 

More seriously..  It is true that /usr/bin/vi is my main editor for most tasks. But I guess I am a little crazy like that because my ksh shell is even set up to utilize vi mode as well.

The reason is simple: I am lazy. These days all my servers are FreeBSD but back in the day I was working with Solaris, Linux, AIX and Windows. So we quickly made vi usage mandatory in order to have some consistency. I don't want to think about editors when I need to edit /etc/resolv.conf nor do I want others to waste time over that. So.. vi.

Even today I mostly use vi, I also have vim installed as well but it only gets used when I need to edit 2 files at the same time.


----------



## geheimnisse (Jan 26, 2018)

Snurg said:


> There is a sublime3 port, but it does not start for some reason, so I tried installing the port you mentioned. That works indeed.
> ^R is sweet. Should suggest the Kate devs to add such.
> However, sublime seems not to have split screen, a feature I cannot live without.
> 
> [...]



Sublime has split screen. Open sublime: View -> Layout.


----------



## forquare (Jan 26, 2018)

It's only recently that I've appreciated the differences between vi(1) and editors/vim, and although part of me would like a stripped back vi experience, I've gotten used to a number of small customisations in Vim and how certain things are displayed by default, so that is what I use day to day - specifically editors/vim-console  (formerly editors/vim-lite).
One of the things I like about vi/Vim is that (almost) whatever system I sit down at, one of the is installed and is usually the default $EDITOR.

While I use Vim for pretty much everything, I do switch to editors/texworks for writing LaTeX documents.

I also use vi mode within my shell (shells/zsh), because it just seems too useful not to.


----------



## Preetpal (Jan 26, 2018)

The text editor that I use on FreeBSD is Emacs (I also use it on Windows, macOS, and Linux (I version control my configuration for a consistent experience)). It's by far the best editor IMO but only if you customize it via Emacs Lisp (by installing packages (libraries) or writing your own code; this is what I do) or if you use a pre-configured version like Spacemacs (crowd sourced configuration with an integrated vim emulation layer with support for many development environments). The nice thing about Emacs is that you can edit files on servers (using SSH via TRAMP) without leaving the text editor so you do not have to know how to use vim or nano.


----------



## mvatten (Jan 26, 2018)

Acme, and occasionally sam or ed.

See the acme screencast at
https://research.swtch.com/acme

Acme and sam are very (three-button-)mouse-centric in a way that, to this user, feels exactly right, especially if sam is patched to use acme's mouse chords; and the edit commands work with structural regular expressions.

Both were written by Rob Pike and are included in the Plan 9 operating
system. For FreeBSD they are available through devel/plan9port, or
directly from https://github.com/9fans/plan9port.

There is documentation at
http://acme.cat-v.org/
http://sam.cat-v.org/
http://doc.cat-v.org/bell_labs/structural_regexps/se.pdf

Mark.


----------



## usdmatt (Jan 26, 2018)

ee master race


----------



## tobik@ (Jan 26, 2018)

Snurg said:


> What I like with Kate too, is that it is the only editor (except of ancient Brief editor) I know of which is able to block mark, cut/copy and paste.
> See the blue marked text block below the open menu. This is so convenient!


Of course Emacs can do this too if you enable cua-selection-mode ;-)


----------



## Preetpal (Jan 26, 2018)

Check out Emacs Rocks if you want to see some cool examples of Emacs in action (http://emacsrocks.com/).


----------



## CraigHB (Jan 26, 2018)

My first exposure to Unix was in the early nineties with Sco Unix.  Of course it was vi for text editing.  As the first editor I learned for Unix it's been hard to abandon for me.  I call it vi hell when I fat finger commands.  It's been to hard to break away from it, so it's what I still use.  Of course there's variants, right now I'm using vim.  At some point I'd like to get used to something possibly better, but I always fall back to vi.


----------



## geheimnisse (Jan 26, 2018)

CraigHB said:


> My first exposure to Unix was in the early nineties with Sco Unix.  Of course it was vi for text editing.  As the first editor I learned for Unix it's been hard to abandon for me.  I call it vi hell when I fat finger commands.  It's been to hard to break away from it, so it's what I still use.  Of course there's variants, right now I'm using vim.  At some point I'd like to get used to something possibly better, but I always fall back to vi.


To be honest I learned vi back in 2001ish when I made the jump from Windows to Linux, and have yet to find anything better.


----------



## chrbr (Jan 26, 2018)

What a topic.

In my opinion the best user friendly editor has been Xedit. We have editors/the but I think it is not the same. I have been get used to vi since ancient Linux Suse 0.99-something , quite some time before the switch from aout to elf. The worse experience I have ever had related to editors has been a Linux rescue medium without vi but nano or whatever. :wq


----------



## kpedersen (Jan 26, 2018)

One that is really interesting to me is Acme. It is the main text editor for Plan 9 (Made by the same guys as UNIX and originally meant to be the successor). I really wanted to like it but it requires a mouse which I personally find really claustrophobic. If any of you here prefer an editor supporting a mouse, definitely give it a go .

Another Plan 9 one is also Sam. Again mouse driven but slightly less complex.
If on Windows, you can either use Inferno or ACME-SAC. On FreeBSD, you can use either Acme from Plan9port or Wily (an X11 clone).


----------



## rigoletto@ (Jan 26, 2018)

editors/neovim


----------



## stratacast1 (Jan 27, 2018)

I use nano a lot. I never really have a need to need anything more advanced for editing files on CLI. Perhaps I'm just missing something here  I'm bad and love Atom. I wish I could get Atom on FreeBSD. I think I could switch my desktop to FreeBSD at that rate


----------



## drhowarddrfine (Jan 27, 2018)

These are the sort of threads I only expect to see on reddit and the answer is, "My favorite editor is the same one everyone mentioned the last hundred times this question was asked here."


----------



## Sensucht94 (Jan 28, 2018)

Throughout years I've settled down using editors/neovim for a CLI editor and editors/scite (awesome) for GUI. I also enjoy using editors/mined from time to time.

vi(1) and ed(1) for quick, low-level editing, or on a fresh install


----------



## rigoletto@ (Jan 28, 2018)

Why not just create a neovim.desktop file for editor/neovim and use that everywhere?


----------



## Datapanic (Jan 28, 2018)

I'm going to add that my favorite DOS editor was qedit.  It was the only editor I knew back then that could cut and paste columns.  I wonder if it ever got ported to other OS's...


----------



## Snurg (Jan 28, 2018)

Datapanic ohh... and I thought Brief Editor from Underware were the only one that could do this 
G**gle just told me that there is a clone available on SF called Grief editor...

But qedit also seems to be still alive, too!


----------



## -Snake- (Jan 28, 2018)

ShelLuser said:


> Oh yeah, vi or die (it even rhymes somewhat so I got to be right)







ShelLuser said:


> More seriously.. It is true that /usr/bin/vi is my main editor for most tasks. But I guess I am a little crazy like that because my ksh shell is even set up to utilize vi mode as well.
> 
> The reason is simple: I am lazy. These days all my servers are FreeBSD but back in the day I was working with Solaris, Linux, AIX and Windows. So we quickly made vi usage mandatory in order to have some consistency. I don't want to think about editors when I need to edit /etc/resolv.conf nor do I want others to waste time over that. So.. vi.
> 
> Even today I mostly use vi, I also have vim installed as well but it only gets used when I need to edit 2 files at the same time.



I understand, the good thing about vi is that it usually comes pre-installed on any unix-like system, and it's quite simple.



Snurg said:


> There is a sublime3 port, but it does not start for some reason, so I tried installing the port you mentioned. That works indeed.
> ^R is sweet. Should suggest the Kate devs to add such.
> However, sublime seems not to have split screen, a feature I cannot live without.
> 
> ...



Kate is very cool as a graphic text editor. It has many features and coloring of syntax.


----------



## Deleted member 9563 (Jan 28, 2018)

I use ne.

I always find this subject a little amusing. Coming from DOS I guess I'm a bit spoiled with the number of editors available. It seems in the *nix world, there are not so many, and they seem to be clones of one another. In any case, I've found editors/ne to be to my liking. The key strokes (eg ctrl-y, del line, and alt-y del to end) are familiar to me. The only thing I miss is the paragraph formatting (eg. Alt-B as used in Qedit). I don't write code, so for me the ability to use the arrow keys for formatting and re-formatting is the most important.


----------



## Deleted member 48958 (Jan 28, 2018)

IMO editors/vim is the best,
gvim and vim are best text editors,
but if you want more complex and easy
to use IDE, use devel/geany, it is nice too,
also there are many geany plugins in ports tree.

gvim:






geany:


----------



## bookwormep (Jan 28, 2018)

Agree with ILUXA on devel/geany. But, I have to tell you that I use so many (each with specialties)
that I end up with an array of editors like a toolbox full of favorites. Setups for FreeBSD installs; I started using the "ee" editor a long time ago - so that one stands out if I have to pick "most favorite."


----------



## azathoth (Jan 29, 2018)

-Snake- said:


> I would like to know which text editor you use in FreeBSD, I like vim very much to program, for very simple things I usually use nano.
> 
> Which one is your favorite?
> 
> PD: This does not try to be a flame "emacs vs vim" just a nice debate.



vi or ed


----------



## macondo (Feb 7, 2018)

nano is my editor and wordprocessor.


----------



## Rastko (Feb 11, 2018)

nano
SciTE
TextEdit.app
xedit


----------



## -Snake- (Feb 12, 2018)

macondo said:


> nano is my editor and wordprocessor.





Rastko said:


> nano
> SciTE
> TextEdit.app
> xedit



Nano is nice for edit config files.


----------



## Cthulhux (Feb 12, 2018)

I use ed (for configs) and Emacs (for everything else).


----------



## Phishfry (Feb 12, 2018)

I am a big fan of misc/ytree an xtree clone using ncurses.
With the shell there I use ee for editing. Shortcut of E with the file highlighted.
I edit my .chsrc to editor=ee as my first run setup chore.

The comma :q exit symbol of `vim` always messes me up. `ee` is just so simple to me. escape key for menu. Horray.
When I first came here I was glad we had nano in packages. But I found myself lost without nano in base. I really found the ee switch quite seemless.
Writing /editing dts files for Arm has proven it is good for 2K+ lines of code. The ee search function works nice and next search function is easy.
Shortcuts onscreen up on top is really the best for me. Maybe in a few years I will migrate down to vim.
Anything in base.


----------



## azathoth (Feb 13, 2018)

ed 
vi when I really gotta rearange text...but more ed as I learn howto use it.


----------



## tobik@ (Apr 21, 2018)

I recently added editors/kakoune to the ports tree. It's a nice little editor that improves on vim's modal model. It has been in development for 5 years now and they just had their first release. Kakoune has a focus on selections and interactivity and you'll generally see ahead of time what portion of text the next command will apply to.

https://github.com/mawww/kakoune/wiki/Migrating-from-Vim shows some of the differences to vim.
http://kakoune.org/ has some screencasts that show off what's possible.


----------



## stratacast1 (Apr 23, 2018)

tobik@ said:


> I recently added editors/kakoune to the ports tree. It's a nice little editor that improves on vim's modal model. It has been in development for 5 years now and they just had their first release. Kakoune has a focus on selections and interactivity and you'll generally see ahead of time what portion of text the next command will apply to.
> 
> https://github.com/mawww/kakoune/wiki/Migrating-from-Vim shows some of the differences to vim.
> http://kakoune.org/ has some screencasts that show off what's possible.



Wow thank you for sharing this. I think I'm going to look deeper into this to see if I can make this my main editor. If so, I think this really only puts me 1 application away from being able to switch my desktop to FreeBSD


----------



## jrm@ (Apr 24, 2018)

stratacast1 said:


> ...I think this really only puts me 1 application away from being able to switch my desktop to FreeBSD


Don't leave us hanging in suspense.  What's the one application?  Maybe something can be done. ;-)


----------



## stratacast1 (Apr 24, 2018)

jrm@ said:


> Don't leave us hanging in suspense.  What's the one application?  Maybe something can be done. ;-)


 I sure wish! I'd really like DRM support in Firefox for DRM protected video playback, but to my understanding, Mozilla locks that in to their own compiled binaries. However, I COULD just make a VM and run FF in there yes? I'd also say Plasma5 but that REALLY isn't a requirement for me. Otherwise, it seems FreeBSD does everything I need it to


----------



## Oko (Apr 24, 2018)

stratacast1 said:


> I sure wish! I'd really like DRM support in Firefox for DRM protected video playback, but to my understanding, Mozilla locks that in to their own compiled binaries.


You understood it wrong. I am running it here on my OpenBSD boxen  Let me know if you need help with the patches for the FreeBSD port.


----------



## rigoletto@ (Apr 24, 2018)

Oko

I belive many people want that in here, eventually ever the www/firefox maintainer.


----------



## stratacast1 (Apr 24, 2018)

Oko said:


> You understood it wrong. I am running it here on my OpenBSD boxen  Let me know if you need help with the patches for the FreeBSD port.


??????? Blah that's basically the last thing I need to get off Linux in my whole house -.- I'd also prefer Plasma5 or GNOME 3.24+, but like I said, not a requirement


----------



## Crivens (Apr 24, 2018)

I use nedit for many things. Then vi/emacs or whatever floats the boat. Yes, I'm an atheist


----------



## drhowarddrfine (Apr 24, 2018)

Next up: What's your favorite color?!!


----------



## Cthulhux (Apr 24, 2018)

Black!


----------



## drhowarddrfine (Apr 24, 2018)

Cthulhux said:


> Black!


Well, that's kind of a gray area.


----------



## SirDice (Apr 24, 2018)

No, no, no. The bikeshed has to be red, obviously.

(How did we get from editors to browsers to colors??)


----------



## macondo (Apr 24, 2018)

SirDice said:


> I've forced myself to learn vi(1). One of the major reason is that it's typically the only editor that's available on different Unix(-like) systems. So it's quite useful to know at least some of the basic editing commands. Now I'm starting to really enjoy vi(1) and vim(1). Muscle memory has gotten so bad I have many MS Word documents with :wq sporadically appearing in the middle of a page



SirDice: try  :x

it's faster...


----------



## Crivens (Apr 24, 2018)

On the last CCC congress was one track of "hacker jeopardy" "what will this do in vi..."


----------



## Spartrekus (Apr 26, 2018)

medit is the best editor ever, small, useful and very easy to compile anywhere.

https://github.com/spartrekus/medit


----------



## shkhln (May 1, 2018)

-Snake- said:


> Which one is your favorite?



SciTE



stratacast1 said:


> I'd really like DRM support in Firefox for DRM protected video playback, but to my understanding, Mozilla locks that in to their own compiled binaries.



Firefox itself doesn't contain any DRM code. Mozilla's wiki actually mentions three third party components: Widevine (Google), Primetime (Adobe), OpenH264 (Cisco). Though, OpenH264 isn't a DRM module either, it is supposed to be a binary distribution of an open-source codec (see https://en.wikipedia.org/wiki/OpenH264#Move_to_free_to_use_binaries).



Oko said:


> I am running it here on my OpenBSD boxen.



I'm really curious as to what *it* is.


----------



## stratacast1 (May 1, 2018)

shkhln said:


> SciTE
> 
> 
> 
> ...



This is true, it isn't IN Firefox, but they ship binaries with the functionality for getting Widevine, which the FreeBSD version does not have. Oko almost makes it sound like his OpenBSD boxen is able to play Netflix in Firefox


----------



## BSDAppentic3 (May 1, 2018)

SirDice said:


> I've forced myself to learn vi(1). One of the major reason is that it's typically the only editor that's available on different Unix(-like) systems. So it's quite useful to know at least some of the basic editing commands. Now I'm starting to really enjoy vi(1) and vim(1). Muscle memory has gotten so bad I have many MS Word documents with :wq sporadically appearing in the middle of a page



Well...vi isn't bad. After all, it is an editor text, and it can accomplish the function because it was programmed.


----------



## BSDAppentic3 (May 2, 2018)

-Snake- 
Sorry, I prefer nano. It is much more comfortable and easy-to-use.
But, if I couldn't install it...then I must use ee. That last isn't bad, but for some tasks (like using visudo) I MUST use vi.
If you could be more explicit with what you mean by "text editors" I'll appreciate it. Because there are text editors that comes with a DE or WM (KDE includes Kwrite, i.g.); others that can be installed in whatever place (leafpad); and the others that are editors of terminal/bash/konsole/etc (like ee, vi, nano, etc.)


----------



## Oko (May 2, 2018)

stratacast1 said:


> This is true, it isn't IN Firefox, but they ship binaries with the functionality for getting Widevine, which the FreeBSD version does not have. Oko almost makes it sound like his OpenBSD boxen is able to play Netflix in Firefox


I figured out you guys are BS-ing anyway so what the heck! Old good Oko can BS as well. 3 pages and 65 post later nobody has the gut to tell the OP that he needs to run a proprietary OS with the official vendor support for his favorite proprietary technologies. This thread should have never had more than 2 posts.

It is so annoying that this forum is full of threads where the person opens by saying: "I want FreeBSD to do the same things on my laptop/desktops as my favorite proprietary system X. I don't care how it works I just want to use it". Great! Let me break the news for you. FreeBSD is not OS for you and you should go away and purchase your favorite proprietary toy.


----------



## drhowarddrfine (May 2, 2018)

Oko I said somewhere that I've noticed far too many reddit-like, amateur questions here lately


----------



## shkhln (May 2, 2018)

Well, stratacast1 was explicitly asked here about their favorite proprietary application. Immediate dismissal wouldn't be very polite. As for Widevine, I think there already exists dedicated complaint thread somewhere on this forum.


----------



## stratacast1 (May 11, 2018)

Plus the more I get tired of Linux the less I give a crap. Poking around with some tiling WMs and MATE (and relevant to the thread: text editors) because I need a stable OS that is actually stable. Working on configuring editors/kakoune on a FreeBSD machine right now, matter of fact.


----------



## Gray Jack (May 11, 2018)

I use neovim for everything here, in any computer, doesn't matter if Linux, *BSD or Solaris based


----------



## Spartrekus (May 12, 2018)

Gray Jack said:


> I use neovim for everything here, in any computer, doesn't matter if Linux, *BSD or Solaris based


What happen if you are one a distant machine, with only GCC and no make, nor ncurses-dev, to continue word processing editing?


----------



## Crivens (May 12, 2018)

Spartrekus, what happens if you get assaulted with a banana? Please look up the sketch  for yourself .


----------



## weaselsnax (May 12, 2018)

acme from plan9port


----------



## 8bitUtopist (Jul 1, 2019)

My main editor is vim (or gvim), I use it everywhere (FreeBSD, GNU/Linux, Windows).


----------



## drhowarddrfine (Jul 1, 2019)

I'm pretty sure every editor has been mentioned by now, and multiple times, as is always true of all such threads everywhere in the universe that asks this exact same question. So can we close this one now until the next same question gets asked later today?


----------



## balanga (Jul 1, 2019)

drhowarddrfine said:


> I'm pretty sure every editor has been mentioned by now



Does anyone remember *brief* ?  Actually I didn't realise it was still available....


----------



## Cthulhux (Jul 1, 2019)

I do, actually. There even is a free clone of it, named GRIEF.


----------



## Crivens (Jul 1, 2019)

I vote for vigor.


----------



## hitest (Jul 1, 2019)

Vi.


----------



## hruodr (Jul 1, 2019)

Perhaps the following is relevant here:






						TextEditors Wiki: HomePage
					

A website about selecting and classifying text editors used in programming systems. These are the programming text editors such as Emacs, VI, Multiedit, slick, Slickedit, ISPF, Notepad, VI and VIM that are used by the vast majority of programmers on UNIX, Windows, VAX, and Mainframe systems. The...



					texteditors.org
				




Interesting to see what well known, famous programmers use.


----------



## Deleted member 48958 (Jul 1, 2019)

VIM! (editors/vim)  I like it very much.
Of course with custom .vimrc. I like it because it's very customizable and usable,
I use it as my only one text editor even when using X11.


Here is my ~/.vimrc (to use *alt* keybindings with xterm, add _XTerm*metaSendsEscape: true_ to your ~/.Xresources file and execute  % xrdb -merge ~/.Xresources, it should work "out of the box" with other terminal emulators like urxvt, gnome-terminal, etc):
	
	



```
syntax on
set clipboard=autoselect        " use X PRIMARY selection
set noswapfile                  " disable swap file
set shortmess+=I                " disable uganda children
set history=1000                " set number of lines of vim command history
set laststatus=2                " always show status line
set autochdir                   " working dir is always the same as the file
set ignorecase                  " ignore case when search
set smartcase                   " ignore case only when lack uppercase
set hlsearch                    " highlight search
set incsearch                   " search while typing
set wildmenu                    " show command predictions
set ttyfast                     " faster scrolling
set mouse=a                     " enable mouse support
"set ttymouse=sgr                " available values: xterm, xterm2, netterm, dec, jsbterm, pterm
set backspace=2                 " disable vi backspace behavior
set autoindent                  " copy indent from current line when starting a new line
set ruler                       " show cursor position
set formatoptions-=cro          " disable auto comment insertion
set scrolloff=3                 " lines before and after cursor when search
set pastetoggle=<F2>            " toggle paste mode
set t_Co=256                    " force to use 256 colors
"set t_ti= t_te=                " disable screen buffer
set noeb vb t_vb=               " disable beeping
set fillchars=stlnc:-,vert:\│   " split border and inactive statusline chars
set whichwrap+=<,>,[,]          " change lines with left/right arrow
"set list                       " display TABs
set listchars=tab:+-            " characters to be used to show TABs
set title                       " enable titles
set titlestring=%F%m\ -\ VIM    " vim titles format
set statusline=%3*%y\ \ %1*%F%2*%m%3*\ \ %{&fileencoding?&fileencoding:&encoding}\ %=\ %1*%l\|%3*%L,%v\ \ %1*%P%*
colorscheme slate

" ctrl+6 to use different keymap in insert mode,
" but always use english to manipulate vim anyway
set keymap=russian-jcukenwin
set iminsert=0
set imsearch=0

" change some colors
hi User1 ctermbg=none ctermfg=white cterm=bold,underline
hi User2 ctermbg=none ctermfg=red cterm=bold
hi User3 ctermbg=none ctermfg=gray cterm=underline
hi TabLine ctermfg=gray ctermbg=black cterm=none
hi TabLineSel ctermfg=white ctermbg=black cterm=bold
hi TabLineFill ctermfg=black ctermbg=black cterm=underline
hi StatusLine ctermbg=none ctermfg=white cterm=bold
hi StatusLineNC ctermbg=none ctermfg=gray cterm=none
hi Visual ctermfg=none ctermbg=black cterm=bold,standout
hi ModeMsg ctermfg=green ctermbg=none cterm=bold
hi WildMenu ctermfg=green ctermbg=none cterm=bold,underline
hi VertSplit ctermfg=green ctermbg=none cterm=underline
hi Search ctermfg=green ctermbg=none cterm=underline,bold

" key bindings
command! W w
command! Q q
" alt+backspace
map <Esc><BS> dvb
im <Esc><BS> <C-w>
" alt+delete
nm <Esc>[3;3~ de
im <Esc>[3;3~ <C-o>de
" alt+z/shift+alt+z - undo/redo in insert mode
im <Esc>z <C-o>:undo<CR>
im <Esc>Z <C-o>:redo<CR>
" r -redo
nm r <C-r>
" p - replace selected
vm p pgvy
" space - clear search highlight
nm <silent> <Space> :nohlsearch<Bar>:echo<CR>
" ctrl+t - new tab in normal mode
nm <C-t> :tabnew<CR>
" ctrl+c - close tab in normal mode
nm <C-c> :close<CR>
" shift+q - close session in normal mode
nm <S-q> :conf qa<CR>
" shift+y - save file in normal mode
nm <S-y> :write!<CR>
" shift+u - update file in normal mode
nm <S-u> :edit!<CR>
" shift+y - yank from cursor to EOL in visual mode
vm Y <Esc>vg_y
" ctrl+shift+alt+pgup/pgdown to move tabs
map <C-S-M-PageUp> :tabmove -1<CR>
map <C-S-M-PageDown> :tabmove +1<CR>
" alt+c - yank selected to clipboard
vm <Esc>c "+y
" alt+x - cut selected to clipboard
vm <Esc>x "+x
" ctrl+v - paste from clipboard in visual/insert/command mode
vm <C-v> "+gp
map! <C-v> <C-R>+
" ctrl+n to show/hide line numbers
nm <C-n> :set invnumber<CR>
" ctrl+l show/hide TAB characters
nm <C-l> :set list!<CR>
" ctrl+f - show number of search results
nm <C-f> :%s///gn<CR>
" ctrl+alt+y - write file with sudo
nm <Esc><C-y> :silent write !sudo tee %<CR>
" ctrl+up/down - home/end
nm <C-up> 0
nm <C-down> $
im <C-up> <C-o>0
im <C-down> <C-o>$
" alt+up/down - delete all text before/after cursor
nm <M-up> v0d
nm <M-down> d$
im <M-up> <C-o>d0
im <M-down> <C-o>d$
" alt+left/right - delete left/right word
nm <M-left> dvb
nm <M-right> de
im <M-left> <C-w>
im <M-right> <C-o>de
" ctrl+alt+up/down - remove/duplicate line
nm <C-M-up> yyp
nm <C-M-down> dd
im <C-M-up> <Esc>yyp
im <C-M-down> <Esc>dd
" ctrl+alt+left/right - backward/forward word in insert  mode
im <C-M-left> <C-o>B
im <C-M-right> <C-o>W
" ctrl+w-\ - maximze current pane (ctrl+w-= to unmaximize)
nm <C-W>\ <C-W>\| <C-W>_
" F3/F4 - split vertically/horizontally
nm <F3> :vsplit<CR>
nm <F4> :split<CR>
" F5 - show word count
map <F5> :w !detex \| wc -w<CR>
" ctrl+del - delete characer from begining of line
function! DeleteFirstChar()
	let save_pos = getpos(".")
	normal! 0x
	call setpos(".", save_pos)
endfunction
nm <Esc>[3;5~ :call DeleteFirstChar()<CR>
im <Esc>[3;5~ <C-o>:call DeleteFirstChar()<CR>

" Auto paste mode when insert
if exists('$DISPLAY')
	let &t_SI .= "\<Esc>[?2004h"
	let &t_EI .= "\<Esc>[?2004l"
	inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
	function! XTermPasteBegin()
	set pastetoggle=<Esc>[201~
	set paste
	return ""
	endfunction
endif

" check file changes every 4s and update file if it was changed
set autoread | au CursorHold * checktime | call feedkeys("lh")

" restore last cursor position
if has('autocmd')
	au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
```


----------



## Sevendogsbsd (Jul 1, 2019)

Normally just the basic "ee" but I do use vi from time to time just so I don't forget the commands. In X, I almost always use devel/geany.


----------



## xtremae (Jul 1, 2019)

Vi


----------



## robotchaos (Jul 1, 2019)

I vote up `sam` for graphical and `ed` for cli.


----------



## Deleted member 9563 (Jul 2, 2019)

I'm not a fan of vi, but due to this discussion decided to start it up to see if there's a delay. There was none at all. That's something I like and what I dislike about my favorite editor, which is ne. Just like ee ne has a very long delay before it fires up. Is there a list of editors that don't use a startup delay? I could be interested in changing if I see the right one.


----------



## Cthulhux (Jul 2, 2019)

OJ said:


> Is there a list of editors that don't use a startup delay?



You mean, editors which need 0 nanoseconds to start? I'm afraid that there are none.


----------



## Deleted member 9563 (Jul 2, 2019)

Cthulhux said:


> You mean, editors which need 0 nanoseconds to start? I'm afraid that there are none.


Well I mean in _human_ terms since it is me (the human) which is the end user) - so, something like 20ms. Even 50ms would be acceptable.

If you don't understand what I mean. Type `vi`, and then type `ee` after that. You'll see.


----------



## Cthulhux (Jul 2, 2019)

OJ said:


> Type `vi`, and then type `ee` after that. You'll see.



Ah, so you actually mean "no _visible_ delay"? Hmm, `ee` is even rather slow when directly compared to `ed`.
Other low-latency editors which I enjoyed or still enjoy using include (but are not limited to) SciTECO and Micro. Most CLI editors, except GNU Emacs and (Neo)Vim, are _relatively_ fast though.

Honorary mention: edwood - a surprisingly good and fast implementation of the (GUI) Acme text editor.


----------



## xtremae (Jul 2, 2019)

Cthulhux said:


> Ah, so you actually mean "no _visible_ delay"? Hmm, `ee` is even rather slow when directly compared to `ed`.
> Other low-latency editors which I enjoyed or still enjoy using include (but are not limited to) SciTECO and Micro. Most CLI editors, except GNU Emacs and (Neo)Vim, are _relatively_ fast though.
> 
> Honorary mention: edwood - a surprisingly good and fast implementation of the (GUI) Acme text editor.



I also enjoy using Micro. Another one that hasn't been mentioned is vis.


----------



## Cthulhux (Jul 2, 2019)

Probably because it's not anyone's favorite.


----------



## jallen (Jul 2, 2019)

vi/vim!
:wq


----------



## marcus123 (Jul 2, 2019)

vi , sometime edit, interested in vim.  I always use vi because it's the first editor I learned from Uni., and it's quite common in my workplace too, so just keep using it.


----------



## rufwoof (Jul 5, 2019)

vi, mcedit, geany are equal favourites for me, depending upon what environment or editing is being performed. I have however recently installed just the free pascal IDE, without all of the compiler etc. stuff and as a text editor that's nice for being able to drag/resize windows in text mode, and even comes with a calculator. Very similar to old TurboPascal's IDE.

I run tilda terminal with F1 set to show/hide it, Quake style dropdown terminal. So the top line/row in the attached is Tilda tabs with the visible tab showing that FreePascal IDE with a couple of text files open and the calculator loaded


----------



## drhowarddrfine (Jul 5, 2019)

I'm glad this two-year old thread exists. It gives people who respond to it something to do and keeps them off the streets.


----------



## Nicola Mingotti (Jul 5, 2019)

my favourite are `Emacs` and `mg`. I use `vi` because it is everywhere, but i don't love it. 

mg is in OpenBSD base, one of the  things we may copy in FreeBSD. IMHO.


----------



## _martin (Jul 5, 2019)

editors/vim and editors/bvi. I do like ed(1) too, though I use it mostly on HP-UX.


----------



## Cthulhux (Jul 5, 2019)

Nicola Mingotti said:


> I use  vi because it is everywhere



I wish it was.


----------



## BSD User (Jul 5, 2019)

vi


----------



## meine (Jul 5, 2019)

vim

I'd never quit using the program, even if I knew how ;-)


----------



## Nicola Mingotti (Jul 5, 2019)

Cthulhux said:


> I wish it was.


comparing to emacs / mg it really is


----------



## unitrunker (Jul 5, 2019)

For quick script and config editing - vi and micro (with a little helpfrom tmux). Most editing is C/C++/C# where jucipp and monodevelop take over.


----------



## sidetone (Jul 18, 2021)

Now, my favorite text editor is deskutils/lumina-textedit. It's lightweight and has tabs. I use it without the Lumina desktop.


----------



## Alain De Vos (Jul 19, 2021)

drhowarddrfine said:


> I'm pretty sure every editor has been mentioned by now, and multiple times, as is always true of all such threads everywhere in the universe that asks this exact same question. So can we close this one now until the next same question gets asked later today?


Editors evolve. So it's not bad to ask the same question on regular intervals


----------



## Alain De Vos (Jul 19, 2021)

My prefered editor is the colorfull xed, default editor of linux mint.


----------



## drhowarddrfine (Jul 19, 2021)

Alain De Vos said:


> .. it's not bad to ask the same question on regular intervals


Unless the question gets asked infinitum all over the internet. And it does.


----------



## Deleted member 30996 (Jul 19, 2021)

Nailing the lid of the coffin shut...


----------



## hruodr (Jul 19, 2021)

I would change the question to: what qualities should the editor have?

(1) Reliable, it should not spoil my file.

(2) lightweight, it should run also in old computers without time lag.

(3) powerful search and replace functions, regexps across lines.

In scripts I use ed. For elementary things I use (n)vi, but I suspect it does not fulfill 3.
Normaly I use emacs, but condition 2 is not really fulfilled.

Perhaps sam is the right editor, but I do not like the background colours when using it with gui.


----------



## kpedersen (Jul 19, 2021)

hruodr said:


> (3) powerful search and replace functions, regexps across lines.


Not by default but using '!' to pass into specific filters for the task (awk is pretty useful for this), you potentially have a vastly superior solution to a lot of off-the-shelf IDEs.

I have one that looks in headers, including previous versions of headers (from svn, git) for a specific function. Very useful when porting codebases to newer middleware. Yet so niche, that most IDEs will never bother including such a feature.


----------



## hruodr (Jul 19, 2021)

kpedersen said:


> awk is pretty useful for this


But it works line by line. How do I search across lines?

I think the main function of a text editor is that, reading text, recognizing parts, and altering them. 
One could say ed is a regular expressions engine, and it is a powerful text editor, but not enough
and not comfortable.


----------



## sidetone (Jul 19, 2021)

hruodr said:


> (2) lightweight, it should run also in old computers without time lag.











						r/freebsd - Bruh i just wanna install vim...
					

113 votes and 48 comments so far on Reddit




					www.reddit.com
				



Supposedly, vim pulled in dependency hell. I wasn't able to confirm it, because my desktop already had many of those packages.

Also, they had the suggestion of using vim-console and other lightweight packages.


----------



## kpedersen (Jul 19, 2021)

hruodr said:


> But it works line by line. How do I search across lines?


Typically it is used that way but Awk is surprisingly large as a language.

If you do a search in the awk manpage for "getline" you will see a function that allows you to read from file (or pipe) and thus store the entire contents in a string (just like most other languages really). From here you can do any string searching.

Awk is basically similar to Perl or Python without the ability to import external libraries.


----------



## Cthulhux (Jul 19, 2021)

hruodr said:


> powerful search and replace functions, regexps across lines.
> 
> In scripts I use ed.



Wouldn’t Sam make more sense?


----------



## jmos (Jul 19, 2021)

Command line: `mcedit` from Midnight Commander (misc/mc).
Simple GUI editor: X File Write (`xfw`) from X File Explorer (x11-fm/xfe).
Beyond this: of course the damn cool editor I programmed for myself


----------



## mer (Jul 19, 2021)

sidetone said:


> r/freebsd - Bruh i just wanna install vim...
> 
> 
> 113 votes and 48 comments so far on Reddit
> ...


To me that is a fundamental problem with software.  Unless you write it yourself or have the ability to completely customize it, you are stuck with someone else's "vision of perfect".
Take email.  To me, email is text.  You want to send pictures?  Attachements, but email is not "html".

Text Editors:  use drives desired features.
Writing code?  language-specific awareness and ability to customize the layout is often desired.  Color syntax stuff, auto indentation, spaces vs tabs, etc.  Not "necessary" but "nice to have because it makes your life easier".

Writing technical documents?  WSYWIG is useful, but not needed.  Markup languages like roff and others have been used for text processing for a long long time.  

All editors:
I agree with the lightest weight possible for the desired functionality, ease of use/intuitive interface, minimal system requirements.

One of these days a text editor is going to pull in systemd/homed as a dependency.


----------



## bsduck (Jul 19, 2021)

My current choice is editors/featherpad


----------



## sidetone (Jul 19, 2021)

Why would VIM install Wayland? When a window manager or desktop doesn't even install Xorg or Wayland. Their vision of perfect is quite the opposite. Pango is a Linuxism, and has been associated with dependency hell on FreeBSD.

If the package is meant for Wayland, it needs to be vim-wayland. vim-console should be the default install as just vim.


----------



## mer (Jul 19, 2021)

sidetone said:


> If the package is meant for Wayland, it needs to be vim-wayland. vim-console should be the default install as just vim.


Yep, common sense right there.  I'm guessing the port maintainer would accept pull requests


----------



## kpedersen (Jul 19, 2021)

Personally I would recommend editors/vim-tiny anyway so you don't need to spend ages disabling all the dumb auto-format / highlighting clutter that it defaults to these days.

Then for the few plugins you might need, just put them in the respective ~/.vim folder. Easy and fuss free.


----------



## sidetone (Jul 19, 2021)

They need to keep things simple, and replace many dependencies with simple messages, that say: if you want this additional functionality or for this set of bloat for those inclined to unnecessary bloat, install these packages/ports.

What happened to KISS?


----------



## mer (Jul 19, 2021)

sidetone said:


> What happened to the KISS philosophy?


The "I wanna rock and roll all night and party every day" philosophy?


----------



## sidetone (Jul 19, 2021)

Keep It Simple, not rock band depicted on a That 70's Show t-shirt.

They may as well have an install that calls on every single port library and many suites of ports. And takes 5 days to compile. Then, to get sound, another set of ports needs to be installed that takes another 5 days to compile. That was an exaggeration, it has never been that bad, but it feels like this what was some aim for.


----------



## mer (Jul 19, 2021)

sidetone said:


> Keep It Simple, not rock band depicted on a That 70's Show t-shirt.


Apologies for trying to inject a bit of levity on a Monday.
For the record, I know what KISS is, as my previous sentence says, levity was intended.  Obviously I fell far far short.


----------



## michael_hackson (Jul 19, 2021)

I use vi() for short edits and devel/geany for longer edits and projects.

The latter I find terrific thanks to:

* Lightweight
* Good customisation
* No learning curve
* Save buffer
* Multiple languages and syntax support

But yes, presenting an IDE may be straining the TS a bit but hey.


----------



## Vull (Jul 19, 2021)

I use vi out of habit. I probably wouldn't have taken the time to learn it if it hadn't been necessary way back when, but now that I know how, I kind of prefer it.

Once I have a system up and running, I install vim, mainly for the colorized syntax checking features. Since I don't like the auto-indenting features (also because of old habits), I put this in my ~/.vimrc -- 
	
	



```
set noai inde=
```
For searching and editing headers, include files, and other project-related needs, I just write my own shell scripts using grep and/or sed for those purposes. To avoid re-typing long filenames, I use terse lower-case shell environment variables, which I export via the ~/.shrc file and edit frequently according to my immediate needs.


----------



## Grell (Jul 19, 2021)

I prefer `vi/vim`.  I learned it a long time ago using the program `vimtutor`.  If I am doing some coding I like editors/cream though.


----------



## bugzeo (Jul 19, 2021)

For GUI I prefer *Kate*, but requires lots of libraries and overloads lightweight desktops like XFCE4. For shell, *nano* is the perfect combination.


----------



## astyle (Jul 19, 2021)

bugzeo said:


> For GUI I prefer *Kate*, but requires lots of libraries and overloads lightweight desktops like XFCE4. For shell, *nano* is the perfect combination.


Same editor preferences here, but I do use KDE.


----------



## fernandel (Jul 19, 2021)

Still "vi" which I learn when we have at work RISC computer with AIX on, sometimes "ee" and Midnight Commander which I have also "centuries" on my system.


----------



## Alain De Vos (Jul 19, 2021)

I also you vi. I never took time to learn the emacs key combinations.


----------



## grahamperrin@ (Jul 23, 2021)

Command line

*nano* | editors/nano

Where nano can not be installed, *ee*.

Incidentally, <https://web.archive.org/web/20161108072145/http://www.users.uswest.net/~hmahon/>



> … aee … both a terminal (curses based) interface and native X-Windows interface (in which case the executable is called xae). …



FreeBSD bug 256660 – editors/aee describes xae but there's no such binary
GUI

*Code - OSS* | editors/vscode | Visual Studio Code - Code Editing. Redefined

For ⋯.json files, sometimes Firefox as an editor. www/firefox

For some things (I can't remember what), I use *Geany* | devel/geany | <https://www.geany.org/>


----------



## grahamperrin@ (Jul 23, 2021)

Not my favourite editor, but my favourite discovery (because it can simplify editions):

devel/uclcmd

Here, recent examples include:

`sudo uclcmd set --json --file /usr/local/etc/pkg/repos/poudriere.conf poudriere.enabled false`

`sudo uclcmd set --json --file /usr/local/etc/pkg/repos/poudriere.conf poudriere.enabled true`


```
% uclcmd
Usage: uclcmd get [-cdejklmNquy] [-D char] [-f file] [-o file] variable
       uclcmd set [-cdjmnuy] [-t type] [-D char] [-f file] [-i file] [-o file] variable [UCL]
       uclcmd merge [-cdjmnuy] [-D char] [-f file] [-i file] [-o file] variable
       uclcmd remove [-cdjmnuy] [-D char] [-f file] [-o file] variable

COMMON OPTIONS:
       -c --cjson      output compacted JSON
       -d --debug      enable verbose debugging output
       -D --delimiter  character to use as element delimiter (default is .)
       -e --expand     Output the list of keys when encountering an object
       -f --file       path to a file to read or write
       -j --json       output pretty JSON
       -k --keys       show key=value rather than just the value
       -l --shellvars  keys are output with underscores as delimiter
       -m --msgpack    output MSGPACK
       -n --noop       do not save changes to file, only output to STDOUT
       -N --nonewline  separate output with spaces rather than newlines
       -o --output     file to write output to, defaults to STDOUT
       -q --noquotes   do not enclose strings in quotes
       -t --type       make the new element this type
       -u --ucl        output universal config language
       -y --yaml       output YAML
       variable        The key of the variable to read, in object notation
       UCL             A block of UCL to be written to the specified variable

GET OPTIONS:

SET OPTIONS:
       -i --input      use indicated file as additional input (for combining)

MERGE OPTIONS:
       -i --input      use indicated file as additional input (for merging)

REMOVE OPTIONS:

EXAMPLES:
       uclcmd get --file vmconfig .name
           "value"

       uclcmd get --file vmconfig --keys --noquotes array.1.name
           array.1.name=value

       uclcmd get --file vmconfig --keys --shellvars array.1.name
           array_1_name="value"


%
```


----------



## mark_j (Jul 23, 2021)

Joe


----------



## rorgoroth (Jul 23, 2021)

Console: Micro
Desktop: VS Code


----------



## a6h (Jul 23, 2021)

vim + vscode for non-latin scripts -- guilty!


----------



## zwieblum (Jul 23, 2021)

joe, and for programming kate from TDE


----------



## 1lya (Jul 23, 2021)

If we are talking about standard text editors from the basic configuration of the FreeBSD, then I like EE more than VI.


----------



## mkru (Jul 23, 2021)

I have been using vim/nvim for few years. Then I have switched to Kakoune. I find Kakoune more intuitive, cleaner and more coherent.


----------



## byrnejb (Jul 23, 2021)

`gvim` /`vim` `/vi` in that order.


----------



## Argentum (Jul 23, 2021)

Still good old `vi`


----------



## Minbari (Jul 23, 2021)

Primary editor editors/vim and secondary GNU Emacs.


----------



## fbsd_ (Jul 31, 2021)

My favorite is vscode

but if I will do fast work I prefer
sublime text for GUI
nano or vim for terminal


----------



## freedavidc (Jul 31, 2021)

-Snake- said:


> I would like to know which text editor you use in FreeBSD, I like vim very much to program, for very simple things I usually use nano.
> 
> Which one is your favorite?
> 
> PD: This does not try to be a flame "emacs vs vim" just a nice debate.


Vim. But if it's a gui based text editor for just copy pasting notes, then I would say Leafpad or anything similar would work fine.


----------



## grahamperrin@ (Sep 21, 2021)

Spun off from <https://forums.FreeBSD.org/threads/82101/post-532410> and thereabouts

Re: vi, 



eternal_noob said:


> … There is no escape!



I don't attempt to remove vi.

Instead, I habitually edit things such as /etc/profile so that `EDITOR` and `VISUAL` will be something other than vi. For myself, <https://gist.github.com/grahamperrin/83fa2bd1f3dbf32fa8019ec04f810c6e#etcprofile> and so on (I don't keep the page up-to-date, it's just enough to remind me what must be set and unset). 

End result:


```
root@mowa219-gjp4-8570p-freebsd:~ # echo $SHELL && echo $EDITOR $VISUAL
/bin/csh
/usr/local/bin/nano /usr/local/bin/nano
root@mowa219-gjp4-8570p-freebsd:~ # sh
# echo $EDITOR $VISUAL
/usr/local/bin/nano /usr/local/bin/nano
# exit
root@mowa219-gjp4-8570p-freebsd:~ # exit
logout
% whoami
grahamperrin
% echo $SHELL && echo $EDITOR $VISUAL
/bin/tcsh
/usr/local/bin/nano /usr/local/bin/nano
% sh
$ echo $EDITOR $VISUAL
/usr/local/bin/nano /usr/local/bin/nano
$ exit
%
```

Above, I prefer editors/nano because it's what was taught to me around 1994.

More generally, for a base system installation, ee will be a better choice.

Picturing ee, aee and nano:


----------



## Cthulhux (Sep 21, 2021)

Nano did not exist in 1994.


----------



## Zvoni (Sep 21, 2021)

Console: Nano
GUI: Geany


----------



## grahamperrin@ (Sep 21, 2021)

Cthulhux said:


> Nano did not exist in 1994.



True.

So, PICO was taught to me, then at some point during the past twenty years or so I made a seamless switch to nano, eventually I forgot PICO. I'll stick with nano.


----------



## grahamperrin@ (Sep 21, 2021)

mkru said:


> … Kakoune. …




```
% sudo pkg install --quiet --yes editors/kakoune
% kakoune
kakoune: Command not found.
% pkg info --list kakoune | grep bin/
        /usr/local/bin/kak
% kak
%
```


----------



## astyle (Sep 21, 2021)

I first learned about PINE in college, back in 2001, it was a University of Washington product from Seattle. Wayback machine reminded me what info page about PINE looked like back then. PINE is what introduced me to Pico, which was way easier than Vi. I liked it to the point that I was able to track down Nano, the successor, and I'm grateful it's still in ports.


----------



## macondo (Sep 21, 2021)

In order of usage:
1, ee   -- easy, no thinking
2. nano  -- muscle memory
3. vi   -- gotta go slow - thinking-- save/exit :x enter.


----------



## zirias@ (Sep 21, 2021)

Shouldn't there be a poll? Cause seriously, if you don't count "notepad" (and some other pretty "simple" editors), the main question is just which user interface you like best (or: know best).

Anyways, another vote for vim (or, if not available, any other "vi" implementation).


----------



## Cthulhux (Sep 21, 2021)

Zirias said:


> Shouldn't there be a poll?



Does this forum’s software even allow polls with more than 300 options?


----------



## zirias@ (Sep 21, 2021)

Cthulhux said:


> Does this forum’s software even allow polls with more than 300 options?


I count exactly three: Vi(m), Emacs, Toys.


----------



## Cthulhux (Sep 21, 2021)

Zirias said:


> I count exactly three: Vi(m), Emacs, Toys.








						TextEditors Wiki: EditorIndex
					

A website about selecting and classifying text editors used in programming systems. These are the programming text editors such as Emacs, VI, Multiedit, slick, Slickedit, ISPF, Notepad, VI and VIM that are used by the vast majority of programmers on UNIX, Windows, VAX, and Mainframe systems. The...



					texteditors.org


----------



## dbdemon (Sep 21, 2021)

stratacast1 said:


> I use nano a lot. I never really have a need to need anything more advanced for editing files on CLI. Perhaps I'm just missing something here  I'm bad and love Atom. I wish I could get Atom on FreeBSD. I think I could switch my desktop to FreeBSD at that rate


There is this:








						Releases · tagattie/FreeBSD-Atom
					

Atom port for FreeBSD. Contribute to tagattie/FreeBSD-Atom development by creating an account on GitHub.




					github.com
				




atom.io a.k.a. Atom is the editor I use most of the time these days, but it looks like development has slowed down considerably in recent times after Microsoft took over Github. I wish there was another, more actively developed editor similar to Atom, and which also existed as a package for FreeBSD.
I know the basics of vi/vim, and also used Emacs for several years while in uni. Maybe these editors can be pimped up to do some of the cool things Atom can do? I haven't really looked into it.


----------



## Menelkir (Sep 21, 2021)

dbdemon said:


> Maybe these editors can be pimped up to do some of the cool things Atom can do? I haven't really looked into it.


Not so sure about vim, but I'm pretty sure emacs can do that.


----------



## Geezer (Sep 22, 2021)

Default shell: sh
Default editor: ee


----------



## jeremypass96 (Sep 24, 2021)

Console: micro
Xorg: Mousepad (when using XFCE)


----------



## drhowarddrfine (Sep 24, 2021)

dbdemon said:


> Maybe these editors can be pimped up to do some of the cool things Atom can do?


In a professional environment, "pimped up" is not what one is interested in.


----------



## trev (Sep 24, 2021)

vi - for general editing (scripts, text files eg HTML).

emacs - for programming (and compiling) C, Pascal.


----------



## eternal_noob (Sep 24, 2021)

Console -> nano
X -> gedit


----------



## Geezer (Sep 24, 2021)

Console: ee
X: geany


----------



## eternal_noob (Sep 24, 2021)

Found this on Reddit and thought it would fit here:


----------



## kpedersen (Sep 24, 2021)

eternal_noob said:


> Found this on Reddit and thought it would fit here:


Heh, speaking of the hand written notepad. I recently conducted a technical interview and when it came to the quick programming competency demonstration on the whiteboard (we all love these!), the candidate told me he couldn't be bothered to write it all and so chose a simpler algorithm instead.

Perhaps if we were all forced to write our code on paper first, software would be a lot more succinctly written and more terse. Possibly not as optimal but we can just buy faster processors right?


----------



## hruodr (Sep 24, 2021)

kpedersen said:


> Perhaps if we were all forced to write our code on paper first, software would be a lot more succinctly written and more terse. Possibly not as optimal but we can just buy faster processors right?


Perhaps more optimal. How cares today on performance instead of relying in fast and faster processors?


----------



## kpedersen (Sep 24, 2021)

hruodr said:


> Perhaps more optimal. How cares today on performance instead of relying in fast and faster processors?


That said, my trusty X61 ThinkPad already starts to burn my lap once I load up a web browser


----------



## Cthulhux (Sep 24, 2021)

hruodr said:


> Perhaps more optimal. How cares today on performance instead of relying in fast and faster processors?



Don’t you see a hypothetical problem with the fact that 2021 software is even slower on 2021 computers than 80s software was on 80s computers, despite not having much more features?


----------



## Geezer (Sep 24, 2021)

Cthulhux said:


> Don’t you see a hypothetical problem with the fact that 2021 software is even slower on 2021 computers than 80s software was on 80s computers, despite not having much more features?


That is not so.


----------



## drhowarddrfine (Sep 24, 2021)

kpedersen said:


> Perhaps if we were all forced to write our code on paper first, software would be a lot more succinctly written and more terse. Possibly not as optimal but we can just buy faster processors right?



Back when men were men and terminals were 80x24, I used to print out my code so I could step through it and edit using a red flair pen.


----------



## Cthulhux (Sep 24, 2021)

Geezer said:


> That is not so.


It is.


----------



## Geezer (Sep 24, 2021)

Geezer said:


> That is not so.





Cthulhux said:


> It is.


Right. Pistols at dawn then.


----------



## Cthulhux (Sep 24, 2021)

I’ll come with The Gun.


----------



## eternal_noob (Sep 24, 2021)

*gets popcorn (and Notepad )*


----------



## hruodr (Sep 24, 2021)

Geezer said:


> Default shell: sh
> Default editor: ee


No, ee not. Either ed or vi. ee is a mostly unknown editor, better to delete it from base.


----------



## Deleted member 30996 (Sep 24, 2021)

hruodr said:


> ee is a mostly unknown editor, better to delete it from base.


I use `ee` every time I build a desktop to set up pf firewall and edit /etc/rc.conf. It's what I reference in my tutorial so new people learn about the King of Text Editors all the time.

Why would it be better to delete it from the base system? There are only two..

Are you trying to take my freedom to choose what editor I use? To force me to use vi? Or did you have a favorite in mine to take it's place?

I do a lot more text editing and that's a far bigger deal to me. I only use commands with the shell whether I'm root or user and they both work the same for me. 

Neither recognize `initiate machine war` or `launch nuclear strike -DC`, but I prefer sh.


----------



## obsigna (Sep 24, 2021)

hruodr said:


> No, ee not. Either ed or vi. ee is a mostly unknown editor, better to delete it from base.


vi only if there is kept a message on the bottom line, like *"*_*if you want to leave vi, don't hard reset your computer, but type in the key sequence ...*_*"* Sorry, but I forgot ... once again.


----------



## mrbeastie0x19 (Sep 24, 2021)

hruodr said:


> No, ee not. Either ed or vi. ee is a mostly unknown editor, better to delete it from base.


Do people really use Ed? I think people can argue all day about what should and should not be in base but most of the time it is pretty insignificant. Doesn't really matter if the base has three tiny but functional editors. Removing things seems pointless most of the time, it makes sense if the program has vulnerabilities that are constantly needing attention otherwise might as well leave it alone.


----------



## ralphbsz (Sep 24, 2021)

kpedersen said:


> Perhaps if we were all forced to write our code on paper first, software would be a lot more succinctly written and more terse.


I've done coding on paper. For example coding in COBOL and RPG-II, then entering the code using a card punch, and commenting the code with a felt-tip pen by writing on the cards. The code itself tends to be very terse (short variable names, no blank lines, and definitely no comments), because card punching is painful and slow. On the other hand, the real work product is not code punched on the cards, it is either the paper version, or the cards with comments. So the net effect is probably not that the writing  is more terse.

Biggest problem with this technique: If you duplicate the source code deck, the comments go away.



hruodr said:


> Perhaps more optimal. How cares today on performance instead of relying in fast and faster processors?



Lots of people care very deeply about performance. Big software engineering departments and big companies have highly specialized experts who improve performance, often putting lots of effort into gains of a few percent here and there. People who spend billions (with a b) on computers tend to be very cost conscious and efficient.

Now, you might say "I don't see any of this when using bloated software on my cell phone / laptop / favorite OS, and everything is slow". Sorry, you're wrong. The software itself is probably quite efficient and well written, it was done by professionals. But: Those professionals are being driven by their user base (those evil customers) to include zillions of features, which users want. And trying to run software that can do zillions of things on undersized hardware is frustratingly slow. Try running that software on the type of hardware it was intended for, and you'll find that modern computers are amazingly fast. How many people remember compiles of 1000-line programs taking 15 minutes on a completely overloaded mainframe (500 users on a 10MIPS machine) or minicomputer (20 users on a VAX 11/780)?


----------



## _martin (Sep 24, 2021)

mrbeastie0x19 said:


> Do people really use Ed?


Interactively? No. But this was my goto weapon on HP-UX in single mode when I had to change the configs and console settings were all messed up. Even today if I have to write a script that does some sort of file modification I use ed due to portability.


----------



## gpw928 (Sep 25, 2021)

If you know how to use ed(1), then you know how to use sed(1), and ex(1), and vi(1) in "line" mode.  It's also the fundamental underlying `sam`.

If you don't know these things, then there is much to discover about the power and elegance of Unix, and it all starts with learning ed(1).



_martin said:


> Even today if I have to write a script that does some sort of file modification I use ed due to portability.


Yes, ed(1) is the one universal scripting tool for in-situ editing that works with complete portability.  For this reason, it should never be removed from base.


----------



## Geezer (Sep 25, 2021)

hruodr said:


> No, ee not. Either ed or vi. ee is a mostly unknown editor, better to delete it from base.



It is what it says on the can ... Easy Editor.

Vi is a dinosaur.


----------



## astyle (Sep 25, 2021)

gpw928 said:


> If you know how to use ed(1), then you know how to use sed(1), and ex(1), and vi(1) in "line" mode.  It's also the fundamental underlying `sam`.
> 
> If you don't know these things, then there is much to discover about the power and elegance of Unix, and it all starts with learning ed(1).
> 
> ...


UNIX is not a religion, buddy.


----------



## grahamperrin@ (Sep 25, 2021)

hruodr said:


> … ee is a mostly unknown editor, better to delete it from base.



With attention to the _easy_ that's explicit in ee: 

what user-friendly alternative would you add to base?
There should be consensus on ease of use. Note, discussions of the type that arose around <https://forums.FreeBSD.org/threads/82101/post-532348>.


----------



## eternal_noob (Sep 25, 2021)

grahamperrin said:


> What's the icon at top left?











						Documentation for Visual Studio Code
					

Find out how to set-up and get the most from Visual Studio Code.  Optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.




					code.visualstudio.com


----------



## hruodr (Sep 25, 2021)

ralphbsz said:


> Lots of people care very deeply about performance. Big software engineering departments and big companies have highly specialized experts who improve performance, often putting lots of effort into gains of a few percent here and there. People who spend billions (with a b) on computers tend to be very cost conscious and efficient.


Well, my posting was more or less irony and you knew it. "who cares today", insinuating no one, means
perhaps few, perhaps in absolute numbers lots as you say.

Who writes for example a program for resolving partial differential equations must care a lot on performance.
But programs for "normal people", like the browser I am using to write this, are mostly a bloat and I
cannot imagine that someone took much care on performance when programming it. Free Software is
a very good thing, but it is filled with bloat.


----------



## ralphbsz (Sep 25, 2021)

Let's stick to the browser example. I don't know whether there is any browser left that is written by amateurs, since I don't know who develops Opera, Firefox, and the myriad of other open source browsers. Three of the big browsers (Edge, Safari and Chrome) are developed by paid professionals, working for companies that are for profit. I'm quite sure that the three teams that develop those browsers try to make them reasonably efficient. Where "reasonably" mean: A tradeoff between functionality and size / speed. And in the few cases where I know people working on them (or at least know about them), I can assure you that faster performance and smaller size is an important design goal, and that things like performance regressions are treated like bugs and fixed. And I do occasionally eat lunch with people who do develop browsers (Silicon Valley is a small town).

Now, it is very likely that many of the features and capabilities that those engineering teams implement are things you are not personally interested in. You might call them "bloat", from your viewpoint. That is interesting, but not relevant: A big company and a big engineering team that creates a tool that has to solve billions of users has to make a compromise on what features need to be supported. That compromise is usually towards saying "yes" rather than "no", in particular in a competitive landscape. As an example, I use two browsers (Safari and Chrome) all the time on a reasonably modern computer (a 2017 MacBook Pro), and I have no performance problems, with dozens of tabs open, and typically one tab playing video (I use youtube as a classical music player). One of my colleagues typically has many hundreds to low thousands of tabs open (he uses some browser extension to manage and find tabs), and he doesn't complain about performance either. I would not call that "bloat".


----------



## hruodr (Sep 25, 2021)

ralphbsz said:


> on a reasonably modern computer


30 years ago people would have dream to have a computer as powerful as a smartphone,
they would have written wonderful programs on it.

Were the programs for computer algebra like reduce and maxima not wonderful at the time they
appeared? Based on LISP, one of the oldest high level computer programming languages? Sure there
are today similar wonders, but their number do not increase with the power of computers, a web
browser is very far away of being one.


----------



## grahamperrin@ (Sep 25, 2021)

eternal_noob said:


> <https://code.visualstudio.com/docs>



Thanks. Weird, I use *Code - OSS* every day but could not recognise the icon of Visual Studio Code.

The icons are subtly different:






(I probably do have Visual Studio Code on Windows somewhere, can't recall when I last used it.)

Side note: Icons missing for GTK-Mixer, Firefox, Thunderbird and more • KDE Community Forums


----------



## drhowarddrfine (Sep 25, 2021)

ralphbsz said:


> And I do occasionally eat lunch with people who do develop browsers (Silicon Valley is a small town).


When I worked for SGI, I'd occasionally sit at the same table as Jim Clark, the founder, and listen in. I recall him talking about having a meeting with someone about a new internet browser. That must have been Marc Andreessen and the new browser was eventually Firefox.

Another aside. Was taking the shuttle at the airport when this guy was trying to get his box on the bus and dropped it. The guy was Ed Catmull and his box was Pixar hardware. How many here knew Pixar once made hardware?


----------



## mer (Sep 25, 2021)

Editors.  Just like desktop environments, everyone has an opinion, everyone believes "their choice is best".
A big aspect of text editors to me, is "muscle keystroke memory".
I'm a vi and emacs user for a long time, sometimes I find myself doing ctrl-x ctrl-s in vi and go "why is my terminal frozen?  Oh stupid me". Of course doing vi sequences in emacs also leads to fun stuff 

vi (or variants) is pretty standard in the default install of every Unix and *nix system I've ever worked on, so even just learning the basics to modify and save changes is worth while.

switching to ee or others?  Not in the default install, users can install it if they need it.


----------



## grahamperrin@ (Sep 25, 2021)

mer said:


> the default install



The installer could offer a choice.


----------



## kpedersen (Sep 25, 2021)

grahamperrin said:


> The installer could offer a choice.


The installer is designed to install the standard OS. It is not really a good place to provide an "OS DIY maker kit". For that you are much better off using the build system and generating an .iso from that.


----------



## grahamperrin@ (Sep 25, 2021)

kpedersen said:


> The installer is designed to install the standard OS.



The installer already offers choices in a variety of areas.

There's enough contention/frustration around vi and ee to justify offering the choice.


----------



## mer (Sep 25, 2021)

grahamperrin said:


> The installer already offers choices in a variety of areas.


No offense, but "so what?"  What areas?  Areas affecting the default programs installed in base?



grahamperrin said:


> There's enough contention/frustration around vi and ee to justify offering the choice.


Where is the contention and frustration exhibited?  I have never seen anything that would justify a need to offer a choice on this, again, in my opinion.  In my career I can count the number of times I've used ee to edit a file on less than a single finger.  Never used it, never missed it.

I also believe it would be a slope, that would be slippery, with an increasing gradient we'd start on.
Choice of default editor in base system, then what next?

A lot of people seem to forget every shell has an environment variable called EDITOR that you set to define your default editor for a lot of things.  You want it to be ee instead of vi?  setenv EDITOR /usr/bin/ee in your csh/tcsh init files, set EDITOR=/usr/bin/ee; export EDITOR in your sh/bash init files.

You want to use ee from a command line?  Well, simply type ee instead of vi.  In at least 13.0-RELEASE ee is installed by default in /usr/bin/ee.  I have never installed the port or the pkg (pkg info | grep ee does not show it on my system), so it largely boils down to your shell environment settings.


----------



## grahamperrin@ (Sep 25, 2021)

mer YMMV. 

I imagine that you're familiar with the installer, some of your questions surprise me.


----------



## Geezer (Sep 25, 2021)

mer said:


> Where is the contention and frustration exhibited?



Here, with me. I have never got on with vi.

Additionally, there are new users to Freebsd, that do not know (or need to care) about its history, but want to use it. Vi is anything but intuitive.

If you expect Freebsd to continue to mature, be developed and the userbase to expand, it must not be exclusive.


----------



## kpedersen (Sep 25, 2021)

grahamperrin said:


> The installer already offers choices in a variety of areas.


Strangely my experience is the opposite, that the installer asks barely anything. Filesystem and default services mainly.

The installer is actually so basic (which is a good thing) that I really don't believe it even needs to have a TUI interface. The OpenBSD style stdin/out questions is possibly more than enough. bsdinstall currently gives an illusion of it being more complex than it really is.



Geezer said:


> If you expect Freebsd to continue to mature, be developed and the userbase to expand, it must not be exclusive.


Now I am not saying everyone needs to learn (n)vi but there is a delicate balance. For example, if we want the userbase to expand overnight, FreeBSD could just become a Linux distro or a Windows reseller. However none of us would want to see that. Exclusivity is sometimes what keeps a higher quality of software.

Looking at the top players, I would even suggest that userbase and quality are mutually exclusive properties.

What I do think is ideal (and something FreeBSD currently does well) is prefer small, light UNIX-like software. That way we can justify having 5 small text editors in base. We could even probably fit 20 in there before the size adds up to something heavier like Vim or Emacs.


----------



## Geezer (Sep 25, 2021)

Both vi and ee are already in the base. No need for any more.

But ee is _*easy*_.


----------



## hruodr (Sep 25, 2021)

Well, no tragedy if it remains in base as an editor for beginners. But I think it is good to learn a little of vi
and ed, because they are in every Unix like system.

Also OpenBSD has an alternative editor in base, but perhaps not as simple as ee:



			mg(1) - OpenBSD manual pages
		



```
# ll /bin/ed /usr/bin/ee /usr/bin/vi
-r-xr-xr-x  2 root  wheel   57752 Jul 23  2020 /bin/ed*
-r-xr-xr-x  3 root  wheel  100840 Jul 23  2020 /usr/bin/ee*
-r-xr-xr-x  6 root  wheel  451392 Jul 23  2020 /usr/bin/vi*
# ldd /bin/ed /usr/bin/ee /usr/bin/vi
/bin/ed:
        libcrypto.so.8 => /lib/libcrypto.so.8 (0x800a00000)
        libc.so.7 => /lib/libc.so.7 (0x800e75000)
/usr/bin/ee:
        libncursesw.so.8 => /lib/libncursesw.so.8 (0x80083a000)
        libc.so.7 => /lib/libc.so.7 (0x800a99000)
/usr/bin/vi:
        libutil.so.9 => /lib/libutil.so.9 (0x80088f000)
        libncursesw.so.8 => /lib/libncursesw.so.8 (0x800aa3000)
        libc.so.7 => /lib/libc.so.7 (0x800d02000)
```

See also:


```
# ll /usr/local/plan9/bin/sam
-rwxr-xr-x  1 root  wheel  150776 Oct  4  2020 /usr/local/plan9/bin/sam*
# ldd /usr/local/plan9/bin/sam
/usr/local/plan9/bin/sam:
        libm.so.5 => /lib/libm.so.5 (0x800846000)
        libutil.so.9 => /lib/libutil.so.9 (0x800a76000)
        libthr.so.3 => /lib/libthr.so.3 (0x800c8a000)
        libc.so.7 => /lib/libc.so.7 (0x800eb2000)
```


----------



## eternal_noob (Sep 25, 2021)

grahamperrin said:


> The icons are subtly different


Funny. I had to look twice to see the difference.


----------



## mer (Sep 25, 2021)

Geezer said:


> If you expect Freebsd to continue to mature, be developed and the userbase to expand, it must not be exclusive.


Both are already installed by default.
The choice of "which is default" is up to the user, by setting EDITOR in their shell init scripts.

Why is ee any easier than vi?  Simply because one of the e's stands for "easy"? If I already have vi command memory muscled, ee is not easy to me.

Is it that difficult for a user to set up their shell init scripts to have their preference?
Or if one is using a desktop environment to set the preferences to their editor of choice?
Or if you want to use ee from a command line, you need to type in ee instead of vi?
Or should vi be a symlink to ee?

grahamperrin yes, but the questions I remember relate to system setup;  you are advocating for a choice in the default editor for all users, which frankly is suprising to me.

This thread is a prime example that on anything, people have preferences and alot of this thread sounds like "the system default XYZ should be MY preferred XYZ, so that I don't have to do anything special to set the default to my preference."
Which basically says "the other 50% that preferred the current default XYZ should be forced to do extra work now instead of me".

Again, I really don't care what text editor you prefer to you, both vi and ee are installed in the default installation, if you want to set your personal choice, set it in your shell environment variables just like everyone else does.


----------



## Geezer (Sep 25, 2021)

mer said:


> The choice of "which is default" is up to the user, by setting EDITOR in their shell init scripts.



Ah-ha! Bloody difficult changing any sort of config file that might give you the editor of your choice, _if you can't use the editor that you did not choose._



mer said:


> Why is ee any easier than vi?  Simply because one of the e's stands for "easy"?



No, not 'cos it stands for easy. But because it has got the instructions at the top of the screen by default and has simple and explanatory pop up menus.



mer said:


> If I already have vi command memory muscled, ee is not easy to me.



Yes! New users do not have it 'memory muscled' <rhetorical>do they?</rhetorical> Nor do I (and I am not new).


Escape - Bang - Whoosh - Flip ... oh, sorry. How do you use vi again?


----------



## hruodr (Sep 25, 2021)

Geezer said:


> Yes! New users do not have it 'memory muscled' <rhetorical>do they?</rhetorical> Nor do I (and I am not new).


In older releases there was a vi tutorial in the packages, but it disappeared: vilearn.

Emacs has its own tutorial.

Just googled it:



			PCF: VILearn tutorial


----------



## Geezer (Sep 25, 2021)

Ee, and all the wysiwyg editors, you don't need tutorials. Really, for the simple task of typing stuff in, you should not need a tutorial. Word processors of any worth, you can just pick them up by usage.

Vi and emacs! Why disappear into a parallel universe in order to modify a few config files.


----------



## hruodr (Sep 25, 2021)

Geezer said:


> Ee, and all the wysiwyg editors, you don't need tutorials.


Of course you have and use them, you have them continuously in front of your eyes. I find it disturbing.

On the meantime emacs use X11 and you have menus, this is also like a tutorial.

For the limited functionality of ee, emacs and vi are as easy to use as ee.


----------



## grahamperrin@ (Sep 25, 2021)

mer said:


> Why is ee any easier than vi? Simply because one of the e's stands for "easy"?



Sorry, that does not press any buttons.


----------



## Geezer (Sep 25, 2021)

hruodr  Yes, I do understand that those who love vi (and emacs) are happy with them.

But the same people must realise both that
* those who do not like vi are not happy
and
* those who want to try Freebsd and have never used vi *get stuck*.


----------



## hruodr (Sep 25, 2021)

Geezer said:


> Yes, I do understand that those who love vi (and emacs) are happy with them.


It has nothing to do with liking them or not.

I do see that ee is good for beginners. But if someone does not like to get struck on any unix like system,
better he learns a little to deal with vi and ed. That is all what I say. They are standards, and standards
are convenient even if they are not perfect.


----------



## Geezer (Sep 25, 2021)

Possibly I should submit this howto: Get out of vi when you are stuck!

`<Alt> <F2>`

login: `root <Enter>`

password: `whatever <Enter>` 

$ `pkill vi <Enter>`

`<Alt> <F1>`


----------



## grahamperrin@ (Sep 25, 2021)

mer said:


> … you are advocating for a choice in the default editor for all users,



To avoid confusion

I'd like the installer to ask the person installing whether the installed system should default to:

ee (easy editor); or
vi.



mer said:


> … "the other 50% that preferred the current default XYZ should be forced to do extra work now instead of me".



Visualise one hundred percent of one person performing an installation on a single computer.


----------



## grahamperrin@ (Sep 25, 2021)

Geezer said:


> <Alt> <F2>



Control-Alt-F2 might be better. 

(When, for example, a person uses a terminal in a desktop environment to perform a system update/upgrade routine that leads to vi.)


----------



## kpedersen (Sep 25, 2021)

Geezer said:


> Why disappear into a parallel universe in order to modify a few config files.


That is what Microsoft has been telling sysadmins for years. Just click some buttons instead 

ee is no problem. Though you are still seen as a "technical wizard" because it can be used via a command line. One day people will push to have a heavy GUI system on a server just because "why use a command line to modify a few config files". FreeBSD has to draw a line somewhere or it will become a mess.

Plus you can pick up vi in a couple of afternoons. It is fairly limited compared to Vim so its difficulty isn't endless. If people can go through the trouble of learning ZFS, Bhyve, ports, WM config and countless other things, a text editor isn't impossible.

ed or ex is where I draw my line (for interactive use). I can't seem to find a good workflow with them!


----------



## wolffnx (Sep 25, 2021)

for fast editing `nano` and for X `madedit` or`leafpad`


----------



## drhowarddrfine (Sep 25, 2021)

grahamperrin said:


> The installer could offer a choice.


How many. And why not mine?


----------



## drhowarddrfine (Sep 25, 2021)

In a lot of cases, those who get stuck using vi or need a graphical editor and other things might not be good candidates to be a FreeBSD user. See my sig below.


----------



## grahamperrin@ (Sep 25, 2021)

drhowarddrfine said:


> How many.



I'm aware of only two three in base:

the two above, for which the installer might offer a choice
ed(1).



drhowarddrfine said:


> See my sig below.



I'm a professional.

I prefer ee to vi.



> those who get stuck using vi or need a graphical editor and other things might not be good candidates to be a FreeBSD user.



Things:






Hint: that's from the FreeBSD Foundation.


----------



## Beastie7 (Sep 25, 2021)

ee - config files
vim - scripting


----------



## Cthulhux (Sep 25, 2021)

Geezer said:


> those who want to try Freebsd and have never used vi *get stuck*.


It is not notably harder to learn vi than to learn FreeBSD. It took me about two hours to understand the basics.


----------



## drhowarddrfine (Sep 25, 2021)

Cthulhux said:


> It is not notably harder to learn vi than to learn FreeBSD. It took me about two hours to understand the basics.


I can teach you the basics in five minutes


----------



## Cthulhux (Sep 25, 2021)

I have upgraded to sam and Emacs.


----------



## Vull (Sep 25, 2021)

Well. Color me entirely entertained by the diversion into the topic of "default editor," yet color me also slightly confused. I can't recall ever being automatically placed into any editor, and normally edit configuration files using this syntax: `[editor-name-of-my-choice] [config-file-name-of-my-choice]`.

I suppose my bewilderment might come about, at least partly, because I normally use packages instead of ports, and, when I do use ports, I normally compile them with `make install clean`, which, if I remember right, never places me automatically into any editor. (It's always possible my memory is faulty since I wouldn't really care if it did.)

Also IIRR, when I initially started using AIX about thirty years ago, I had to use either vi or ed-- no other editor program was available on the system-- so I chose vi. Actually it was more or less mandatory for the programming staff to learn vi anyway, but I suppose that too is beside the point. Nowadays I use vi because ( a.) I've already learned it, and ( b.) once having learned it, I've always preferred it, but, assuming that I hadn't already learned it, I might prefer to use ee (AKA edit).

However, I mean to say, if I didn't want to use vi, and, if something was automatically causing the system to force vi on me, on first boot after the install, I would just execute the command: `edit [config-file-that-makes-me-use-vi]` and change my editor preference, to the editor of my choice, with the editor of my choice.


----------



## jb_fvwm2 (Sep 25, 2021)

hruodr said:


> In older releases there was a vi tutorial in the packages, but it disappeared: vilearn.
> 
> Emacs has its own tutorial.
> 
> ...


at first glance, that's the vi tutorial I've been waiting for.  From 1995 btw.


----------



## chrbr (Sep 25, 2021)

Just for fun:

Some time ago I created a vi based geocache https://www.geocaching.com/geocache/GC911D4. It is located near Nuremberg in Germany. The story is about someone who has lost his backups. The admin has found the backups and has hidden them. He gave the poor guy the key strokes to print the coordinates. Unfortunately the story is available only in German language.

The commands I could use are limited by a sandbox in the internet where anybody can try out vi commands. There are more options than just press all the keys to solve the mystery. Finally the coordinates are printed as 'x' patterns turned by 90 degree. And yes, I made it more complex than necessary ;-).


----------



## scottro (Sep 25, 2021)

There is some joke or meme, that I've seen about ssh-ing into a Debian install, which has nano as its default editor, and then trying to figure out how to exit it.  I think ee is similar to nano, but I'm not sure of that. I used to use pico, when I first started using Linux and used pine for mail. Then, in my first IT job, my boss asked me to fix a file on the AIX machine. I had to go back to him and say, It doesn't have pico. He said, You don't know vi? Never mind, I'll do it, I learned vi's basics that night.


----------



## Menelkir (Sep 25, 2021)

scottro said:


> There is some joke or meme, that I've seen about ssh-ing into a Debian install, which has nano as its default editor, and then trying to figure out how to exit it.  I think ee is similar to nano, but I'm not sure of that. I used to use pico, when I first started using Linux and used pine for mail. Then, in my first IT job, my boss asked me to fix a file on the AIX machine. I had to go back to him and say, It doesn't have pico. He said, You don't know vi? Never mind, I'll do it, I learned vi's basics that night.


I've learned vi in the same way. And even today, vi and ksh on aix still pretty much the same, because they keep sane defaults (one of the reasons you can safely update aix from a 4.0 install directly to the last supported version on that machine without issues).


----------



## Deleted member 30996 (Sep 26, 2021)

mer said:


> In my career I can count the number of times I've used ee to edit a file on less than a single finger. Never used it, never missed it.





mer said:


> Why is ee any easier than vi?


Once you enter the file you want to create or access all the commands are listed at the top of the `ee` terminal window that's brought up.

When you're done hit Esc. It will ask if you want to leave without saving, save and exit.


----------



## Deleted member 30996 (Sep 26, 2021)

scottro said:


> I think ee is similar to nano, but I'm not sure of that.


It's almost identical to editors/nano.


----------



## grahamperrin@ (Sep 26, 2021)

scottro said:


> … I think ee is similar to nano, 𠉥…



visual comparison


----------



## drhowarddrfine (Sep 26, 2021)

Why do nano and ee people need a constant reminder of how to use that editor? Aren't there just like 10 commands listed? I see many remark that's a feature (that they're listed) but why don't they just memorize them and be done with that silly thing?


----------



## Geezer (Sep 26, 2021)

drhowarddrfine said:


> but why don't they just memorize them



We do.


----------



## grahamperrin@ (Sep 26, 2021)

drhowarddrfine said:


> Aren't there just like 10 commands listed?



No.

Please follow the link from the previous comment – "visual comparison" – there was a screenshot.



> Why do nano and ee people need a constant reminder of how to use that editor?



We do not. Please see the first two screenshots below.



drhowarddrfine said:


> See my sig below.
> 
> _FreeBSD is a professional operating system for professionals._



Here, a reminder of how *nano* can appear to a professional:




– the word _Cancelled_ is not constant, it was contextual.

*ee*, without its info window:






hruodr said:


> … continuously in front of your eyes. I find it disturbing. …



Above: ee and nano, both disturbance-free. 



drhowarddrfine said:


> … memorize them and be done …



*Getting started with vi*, memorised:


----------



## Deleted member 30996 (Sep 26, 2021)

drhowarddrfine said:


> Why do nano and ee people need a constant reminder of how to use that editor? Aren't there just like 10 commands listed? I see many remark that's a feature (that they're listed) but why don't they just memorize them and be done with that silly thing?


I knew without looking I would have to post these screenshots so I had them ready.


----------



## Geezer (Sep 26, 2021)

You know when you get a Trihexagonal screenshot, it is embellished with a graphic too.


----------



## Deleted member 30996 (Sep 26, 2021)

Geezer said:


> You know when you get a Trihexagonal screenshot, it is embellished with a graphic too.


You are in error. The examples entered into evidence are not to enhance, but to educate:

To enlighten those that can't be bothered to open a terminal and enter the command `ee` and follow it up with a file name prior to posting.

To define definition those dictionary deprived:



> Embellish:
> 1. to beautify by or as if by ornamentation; ornament; adorn.
> 2. to enhance (a statement or narrative) with fictitious additions.


----------



## drhowarddrfine (Sep 26, 2021)

Once again, why do people need to be constantly reminded of only 22 editor commands? Then, again, I don't use 22 different commands when I do every day editing in vim so does that make ee more complicated?


----------



## Geezer (Sep 26, 2021)

Vim (cleaning product) - Wikipedia
					






					en.wikipedia.org


----------



## grahamperrin@ (Sep 26, 2021)

drhowarddrfine said:


> Once again, why do people need to be constantly reminded of only 22 editor commands?



Once again, you seem to be ignoring screenshots. 

Please see the screenshots, on this page, of ee and nano without on-screen commands.


----------



## mrbeastie0x19 (Sep 26, 2021)

Ee is what you expect as a newcomer coming from another operating system where text editors these days behave like that, like notepad or text edit, the other two (vi, ed) are posix. Emacs is good but does too much, I want a text editor not a second operating system.


----------



## eternal_noob (Sep 26, 2021)

Geezer said:


> Vim (cleaning product) - Wikipedia
> 
> 
> 
> ...


When i was 18 and moved out into my first own flat, my mom bought me stuff to support me.
One day she brought a laundry detergent called "Linux".


----------



## Cthulhux (Sep 26, 2021)

drhowarddrfine said:


> Once again, why do people need to be constantly reminded of only 22 editor commands?



A good editor needs three commands:
- Open
- Save
- Exit


----------



## Cthulhux (Sep 26, 2021)

mrbeastie0x19 said:


> Emacs is good but does too much, I want a text editor not a second operating system.



There are various "micro" Emacsen.


----------



## eternal_noob (Sep 26, 2021)

Cthulhux said:


> A good editor needs three commands:
> - Open
> - Save
> - Exit


You forgot the fourth command: Find


----------



## Cthulhux (Sep 26, 2021)

If you need to "find" something, your file needs a better structure.


----------



## eternal_noob (Sep 26, 2021)

Did you never search for a particular command line switch when browsing man pages?


----------



## Cthulhux (Sep 26, 2021)

I use pagers to view man pages, not text editors.


----------



## eternal_noob (Sep 26, 2021)

Well that was only an example that files don't necessarily need a better structure if you search in them.


----------



## hruodr (Sep 26, 2021)

eternal_noob said:


> You forgot the fourth command: Find


And replace?


----------



## eternal_noob (Sep 26, 2021)

There's `sed`. But yeah, it helps.


----------



## Cthulhux (Sep 26, 2021)

It is not the best of ideas to replicate system commands like `sed`, `tee` and others in a text editor. If I will ever be bored enough to write my own text editor, it will not implement any common `sed` features.


----------



## grahamperrin@ (Sep 26, 2021)

grahamperrin said:


> GUI
> 
> *Code - OSS* | editors/vscode | Visual Studio Code - Code Editing. Redefined



Maybe time for me to stop using _Code - OSS_.









						Code - OSS: all open editors lost: seeking lost content/data/files
					

A few hours ago I realised that all editors, probably thirty-something, mostly unsaved, had disappeared from the OPEN EDITORS sidebar of Code - OSS on FreeBSD. From https://github.com/microsoft/vsc...




					stackoverflow.com
				




– not the first time that all open files have disappeared, but this time I'm less hopeful of recovering data.


----------



## kpedersen (Sep 26, 2021)

Cthulhux said:


> It is not the best of ideas to replicate system commands like `sed`, `tee` and others in a text editor.


Agreed. Being able to pipe text through filter programs instantly give the editor an *infinite* number of features.

The only reason a developer of an editor would chose not to provide this functionality is because they simply didn't know about it or if their target market would be better off with a consumer phone anyway.


----------



## eternal_noob (Sep 26, 2021)

grahamperrin said:


> not the first time that all open files have disappeared, but this time I'm less hopeful of recovering data.


I wanted to like your post but i think that's not appropriate.
Have a  instead.


----------



## ProphetOfDoom (Sep 26, 2021)

I find vim and emacs archaic.
There's a reason why "Cut & Paste" became ubiquitous and "Kill & Yank" didn't. It's because "Cut & Paste" reflects something people understand from the real world whilst "Kill & Yank" sounds like the angry outbursts of a developer who's had too much coffee.


----------



## ralphbsz (Sep 26, 2021)

Cthulhux said:


> A good editor needs three commands:
> - Open
> - Save
> - Exit


Save is not needed, it shall be automatic.

Open is not needed, the file name (one!) is on the command line (or what you clicked on the file manager).

Exit is only needed when running from the CLI. And if booting was faster, you could just use the (hardware) reboot button.

P.S. this comment is meant as humor.


----------



## ralphbsz (Sep 26, 2021)

AlexanderProphet said:


> I find vim and emacs archaic.
> There's a reason why "Cut & Paste" became ubiquitous and "Kill & Yank" didn't. It's because "Cut & Paste" reflects something people understand from the real world whilst "Kill & Yank" sounds like the angry outbursts of a developer who's had too much coffee.


Cut and paste requires moving the hand to the mouse. Keeping the fingers on the keyboard is faster, for experienced typists.


----------



## ProphetOfDoom (Sep 26, 2021)

Cut is CTRL-C and paste is CTRL-V in most modern GUI text editors like Geany (although I must confess I rely far too much on massaging the rodent for other tasks). I did use emacs for about a year for programming in Haskell but I felt like I was “fighting” emacs not “using” it. I can’t even remember any of the key bindings.


----------



## Cthulhux (Sep 26, 2021)

AlexanderProphet said:


> I find vim and emacs archaic.
> There's a reason why "Cut & Paste" became ubiquitous and "Kill & Yank" didn't. It's because "Cut & Paste" reflects something people understand from the real world whilst "Kill & Yank" sounds like the angry outbursts of a developer who's had too much coffee.



Also, there are still editors which mislabeled snarfing as “copy”.


----------



## grahamperrin@ (Sep 26, 2021)

ralphbsz said:


> Save is not needed, it shall be automatic. … P.S. this comment is meant as humor.



Fond memories of the {off-topic} that I used before FreeBSD. Automation done right, at the time.


----------



## drhowarddrfine (Sep 26, 2021)

grahamperrin said:


> Once again, you seem to be ignoring screenshots.
> 
> Please see the screenshots, on this page, of ee and nano without on-screen commands.


Yes. You can turn them off but it seems no one does


----------



## hruodr (Sep 26, 2021)

Here is an old tutorial for learning the standard editor:



			http://www.psue.uni-hannover.de/wise2017_2018/material/ed.pdf


----------



## grahamperrin@ (Sep 26, 2021)

> …
> 
> *Error Messages – “?”*
> 
> ...



No disrespect to users of ed and ee (I'm not here to pigeon-hole people), but the cryptic aspects of the _software_ are what drive the wish for newcomers to have the choice of a less cryptic experience.



drhowarddrfine said:


> … You can turn them off but it seems no one does








– someone does not recommend it, but it _is_ a done thing.


----------



## kpedersen (Sep 26, 2021)

grahamperrin said:


> the wish for newcomers to have the choice of a less cryptic experience.


I don't believe FreeBSD will ever have the resources to cater for this kind of newcomer or even (unfortunately) those with reduced accessibility.


----------



## grahamperrin@ (Sep 26, 2021)

kpedersen said:


> I don't believe FreeBSD will ever have the resources to cater for this kind of newcomer …



There were resources for the proof-of-concept installer. 

▶ back again to <https://forums.freebsd.org/threads/82120/>


----------



## hruodr (Sep 26, 2021)

I used ed only for a short time, before changing to emacs, and since then I use mainly emacs, only a little vi. Before that I used a more primitive line editor: sos in DEC System 10. But sos was easier to use, it had a line altering mode, one was able to read a line char by char and delete or insert chars in it. In ed you must either
delete the whole line and write it again, or apply an s command on it.


----------



## kpedersen (Sep 26, 2021)

grahamperrin said:


> There were resources for the proof-of-concept installer.
> 
> ▶ back again to <https://forums.freebsd.org/threads/82120/>


It doesn't look like this is going to help those who are confused by UNIX "cryptic" concepts or by those requiring accessibility aids.


----------



## grahamperrin@ (Sep 26, 2021)

kpedersen said:


> UNIX "cryptic" concepts or by those requiring accessibility aids.





grahamperrin said:


> Please, let's not conflate the issue.


----------



## kpedersen (Sep 26, 2021)

grahamperrin said:


> but the cryptic aspects of the _software_ are what drive the wish for newcomers to have the choice of a less cryptic experience.


I think you may have to unwrap exactly what is "cryptic" before a meaningful discussion can be made. At least accessibility issues can be easily defined.


----------



## grahamperrin@ (Sep 26, 2021)

kpedersen said:


> exactly what is "cryptic"





grahamperrin said:


> "… vi … sometimes you will inadvertently issue a command that will do something you do not expect. … when it gives you trouble …" – more than twenty-four years ago.





grahamperrin said:


> Problems with _accidental/unexpected_ appearance of vi were acknowledged more than twenty years ago. We should do better.
> 
> Avoid putting end users in accident-prone situations.


----------



## kpedersen (Sep 26, 2021)

If you are suggesting that the FreeBSD tips file is filled with "cryptic" issues. There is absolutely no way you will solve them all. Certainly not by any amount of work put into an installer.

What about the basic shell usage? I.e ctrl-z ("program accidentally vanishes") and ctrl-d ("shell accidentally logs me out").

This will be endless and by the end, you will not likely have a useful OS anymore.


----------



## grahamperrin@ (Sep 26, 2021)

kpedersen said:


> If you are suggesting that the FreeBSD tips file is filled with "cryptic" issues.



No, I'm not.

Please stop conflating.



kpedersen said:


> endless



Please stop conflating.

Elsewhere, this seems endless:


----------



## kpedersen (Sep 26, 2021)

grahamperrin said:


> No, I'm not.
> 
> Please stop conflating.


OK, well I'm going to leave it here too. I think potentially your view on what you need from a (base) editor and FreeBSD are a little bit more narrow compared to mine.


----------



## grahamperrin@ (Sep 26, 2021)

kpedersen said:


> what you need



It's not about me. It's for the benefit of other users.

For my needs I have my gist, which I mentioned a few days ago.


----------



## kpedersen (Sep 26, 2021)

grahamperrin said:


> It's not about me. It's for the benefit of other users.


You assume all other users only have very narrow needs of an editor?

You may be surprised to find that the editor workflow encompasses extremely wide needs. Yes, you call that conflating but ultimately many of us do need to consider many, many things when it comes to a UNIX-like environment.


----------



## grahamperrin@ (Sep 26, 2021)

kpedersen said:


> all



No.

Please stop conflating/exaggerating. 

It's extremely rare for me to ignore a user, but you're now on the list.

To the opening post: 



-Snake- said:


> just a nice debate.



Let's get back to that.


----------



## kpedersen (Sep 26, 2021)

grahamperrin said:


> No.


So it is for the benefit of a certain selection of users? Well consider me speaking on behalf of the other selection of users


----------



## Geezer (Sep 27, 2021)

ees to the left.

vis to the right.​
_Vive la différence_.​


----------



## Menelkir (Sep 27, 2021)

How about adding vscode to the base?


----------



## Cthulhux (Sep 27, 2021)

I would imagine that an additional (optional) selection “default editor/shell/pager” with an implicit package installation could make sense. Yet, how many editors would the FreeBSD team have to support then?


----------



## grahamperrin@ (Sep 27, 2021)

Cthulhux said:


> installation



▶ <https://forums.FreeBSD.org/threads/technology-roadmap.82120/post-533439>


----------



## hruodr (Sep 27, 2021)

kpedersen said:


> reduced accessibility


A blind person would perhaps prefer ed to ee, he would prefer commands to menus.

The circumstances play a big role. The line editors were used on teletypes. On a teletype
you cannot move back and forwards, up and down with a cursor, there you cannot use vi
or emacs. Today we use ed in scripts, that is also not possible with vi or emacs, 
perhaps also not with the so simple and non cryptic ee.


----------



## kpedersen (Sep 27, 2021)

Cthulhux said:


> I would imagine that an additional (optional) selection “default editor/shell/pager” with an implicit package installation could make sense.


This is where I feel it gets hairy. Lets say someone chooses `vi`, `sh`, `more` (so the other packages don't get installed i.e if the future PkgBase allows this).
Any scripts that they run may require `ed`, `csh`, `less`. These would then break giving bizarre errors.

The "set in stone" concept of base is there not just for what we like but in many ways interoperability. vi,ee,ex,ed are all fine. It is when people start to remove any of them because they "prefer others" that they start to trash base.

Unless you meant always keep those 4 base editors but add more during install. We did used to have that feature in the older sysinstall (around FreeBSD 8 and prior). It just added needless complexity when this can all be done post-install. One of the reasons bsdinstall was made to simplify it.


----------



## hruodr (Sep 27, 2021)

kpedersen said:


> Unless you meant always keep those 4 base editors but add more during install. We did used to have that feature in the older sysinstall (around FreeBSD 8 and prior). It just added needless complexity when this can all be done post-install. One of the reasons bsdinstall was made to simplify it.


I also think that one must have first a base system, and then customise it after the install. Sysinstall allowed
much more possibilities to reach the base install that I miss in bsdinstall. OpenBSD installer, in spite
of its simplicity, or perhaps due to it, also allows more possibilities. To delete things like ed or vi means
departing from standards, that should be done at owns risc.


----------



## Deleted member 30996 (Sep 27, 2021)

drhowarddrfine said:


> Once again, why do people need to be constantly reminded of only 22 editor commands? Then, again, I don't use 22 different commands when I do every day editing in vim so does that make ee more complicated?


I don't. Once I open the EE window to edit or create the file it's no different than using Leafpad to me.

I Copy&Pasted that Eleven Elves sentence in one continuous line from my site. Used the arrow button to get the the word I wanted to use as a break to fit window, hit Enter and it goes to the next line just like Leafpad.

When I'm done it's a matter of hitting Esc, it will ask if I want to leave EE without saving, give me the chance to save and I'm outta here.


hruodr said:


> Today we use ed in scripts, that is also not possible with vi or emacs,
> perhaps also not with the so simple and non cryptic ee.


If it can be written on Leafpad it can be written in EE. I'll borrow some perl from Useful Scripts here in the forum, open `ee` in sh and save it as /usr/home/jitte/*ppp_check.sh**:*






The saved file opened in Leafpad:

/usr/home/jitte/ppp_check.sh:

```
#!/usr/bin/perl

use Net::Ping;

$server_to_ping="ya.ru";


sub check_ping_server
{
$host_alive=1;
$ping=Net::Ping->new('icmp');
if( $ping->ping($_[0]) ) { $host_alive=1;}
 else  {$host_alive=0;}
return $host_alive;
}



if(!check_ping_server($server_to_ping))
    {
    system("killall ppp");
    system("sleep 2");
    # Start PPP ADSL connection
    system("/usr/sbin/ppp -quiet -ddial adsl");
    # Send the message to
    system("echo PPP restarted by timeout...");
    }

exit;
```

Now what's wrong with that, pray tell?


----------



## hruodr (Sep 27, 2021)

Trihexagonal said:


> Now what's wrong with that, pray tell?


(1) You are trashing the forum with unnecessary images.
(2) I was not speaking about opening a script with an editor, but about calling the editor in the script.


----------



## Paul Floyd (Sep 27, 2021)

shell, quick edits and viewing: vi
editing mutliple files doing copy/paste: kate
lengthy editing sessions, possibly running gdb as well: Qt Creator
when other editors not available: gvim, gedit
previously used: netbeans, xemacs
potential future use: vscode


----------



## Geezer (Sep 27, 2021)

hruodr said:


> (1) You are trashing the forum with unnecessary images.
> (2) I was not speaking about opening a script with an editor, but about calling the editor in the script.



Nothing unnecessary about a good image.


----------



## hruodr (Sep 27, 2021)

Geezer said:


> Nothing unnecessary about a good image.


Then tell me please what was good in the image? Why it was necessary if only few bytes text could have said the same (i.e. nothing)?


----------



## Deleted member 30996 (Sep 27, 2021)

hruodr said:


> (1) You are trashing the forum with unnecessary images.


Are you critiquing my desktop? My skills as a graphic artist? Reprimanding me? Moderating me? Banning me from the thread? Sub-forum? Forums? Stating your opinion, like one of which everyone has? Or just being one?

BTW, it was *you* that went off-topic with the mention of removing EE from the base system in the sh or csh thread that got it moved here, hruodr, not me. I replied to _your_ post. Let's be clear on that point.



hruodr said:


> Well, my posting was more or less irony and you knew it. "who cares today", insinuating no one, means
> perhaps few, perhaps in absolute numbers lots as you say.


As to who is trashing the forums and contributing to the forums? That's up for grabs, but stats to the good are on my side. To your left, hruodr.




hruodr said:


> (2) I was not speaking about opening a script with an editor, but about calling the editor in the script.


Thank you for clarifying that. To be brutally honest, I really had no idea what you were talking about:



hruodr said:


> The circumstances play a big role. The line editors were used on teletypes. On a teletype
> you cannot move back and forwards, up and down with a cursor, there you cannot use vi
> or emacs. Today we use ed in scripts, that is also not possible with vi or emacs,
> perhaps also not with the so simple and non cryptic ee


----------



## hruodr (Sep 27, 2021)

Trihexagonal said:


> Are you critiquing my desktop? My skills as a graphic artist? Reprimanding me? Moderating me? Banning me from the thread? Sub-forum? Forums? Stating your opinion, like one of which everyone has? Or just being one?


Just pointing out that an image needs much more bytes than a little of eqivalent text, and that the forum has limited space.


----------



## Geezer (Sep 27, 2021)

I think I will use ee with a background now as well.

I have got _millions_ of pictures. I might post ee with a background of only some of them.

Oh look! `ESC-Enter: exit` Now I know how to get out!


----------



## kpedersen (Sep 27, 2021)

I am bike shedding here. Though certainly conflicted because:

1) One of the best features of a text based editor (or text-based anything) is that it can be posted in plain-text, allowing for easy copy/search. Many programming forums even ban screenshots of code.

However...

2) I also do quite like seeing pictures of UNIX software, including desktops (I am a nerd after all ) and I feel the mailing lists miss out on this a little.


----------



## hruodr (Sep 27, 2021)

kpedersen said:


> Many programming forums even ban screenshots of code.


That is why I wrote unnecessary images.


----------



## drhowarddrfine (Sep 27, 2021)

Next up. What's your favorite color?!

(These threads never end well.)


----------



## Geezer (Sep 27, 2021)

kpedersen Yes, I appreciate your nerdiness.

hruodr and  drhowarddrfine  The two most popular threads on this forum are Thread music.34705 and Thread freebsd-screen-shots.8877. Quite obviously, most Freebsd users appreciate aesthetics.

A usable and simple default editor enhances the aesthetics.


----------



## bsduck (Sep 28, 2021)

I don't understand why people can get so emotional about a default text editor. It's just about making life easier for the most people, not to prevent anyone from using whatever preferred tool.

Like grahamperrin I think the best solution would be to be able to choose this in the installer at the user creation stage. I mean, both vi and ee are in base (we're not talking about adding stuff) and we're likewise asked for the default shell to use, so editor choice could easily be offered at this point and everyone would be satisfied.

This "if you can't use vi you're not good enough to use FreeBSD" attitude shown by some people is plain stupid. I've never used vi but I'm perfectly comfortable using FreeBSD as my only operating system everyday. So happily do many other people around the world. I suppose we should all stop using it and buy a Mac instead, because we don't belong to the elite of veteran UNIX gurus?


----------



## grahamperrin@ (Sep 28, 2021)

Snurg said:


> … What I like with Kate too, is that it is the only editor (except of ancient Brief editor) I know of which is able to block mark, cut/copy and paste. …



Code - OSS, _column selection mode_:



Postscript (sorry, I should have also quoted this):



tobik@ said:


> Emacs can do this too if you enable `cua-selection-mode` ;-)


----------



## ralphbsz (Sep 28, 2021)

Emacs has rectangular cut and paste.

EVE had it in the 80s on the VAX.


----------



## bakul (Sep 28, 2021)

Back when things were much simpler, some of us used `cat` for writing new programs (if expected to be short).  Only if the program had some syntax or logic error did we switch to `vi` (or another editor). Of course, you had to have a pretty good idea of what the program was supposed to do before you got started but that is a generally a good thing in any case! Even now I some time start short programs thus: `> foo.c ; cc foo.c && a.out ...` but that is just out of laziness.



ralphbsz said:


> Emacs has rectangular cut and paste.
> 
> EVE had it in the 80s on the VAX.


The RAND editor had it since late '70s. It had a number of operations on rectangular selections: draw a box, erase, replace, overlay, underlay, pipe through an external program etc. I used it in preference to vi for a number of years (starting in '81 or '82). It was one of the easiest editors to teach people who were not computer savvy. While there were control-char shortcuts for common commands, pretty much every command could be executed from the command line using their easy to remember names. It also provided multiple windows (you could split any window horizontally or vertically). It had no undo command but you could abort the editor and replay your keystrokes!


----------



## hruodr (Sep 28, 2021)

ralphbsz said:


> Emacs has rectangular cut and paste.


Yes. I use rectangular cut and paste from time to time. My problem with emacs:


```
# ll /usr/opt/emacs-26.3/bin/emacs-26.3
-rwxr-xr-x  1 opt  opt  59986208 Jul 12 06:26 /usr/opt/emacs-26.3/bin/emacs-26.3*
# ldd /usr/opt/emacs-26.3/bin/emacs-26.3
/usr/opt/emacs-26.3/bin/emacs-26.3:
        libSM.so.6 => /usr/local/lib/libSM.so.6 (0x800a31000)
        libICE.so.6 => /usr/local/lib/libICE.so.6 (0x800c39000)
        libX11.so.6 => /usr/local/lib/libX11.so.6 (0x800e53000)
        libX11-xcb.so.1 => /usr/local/lib/libX11-xcb.so.1 (0x801199000)
        libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x80139a000)
        librt.so.1 => /usr/lib/librt.so.1 (0x8015c4000)
        libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x8017ca000)
        libXrandr.so.2 => /usr/local/lib/libXrandr.so.2 (0x8019cd000)
        libXinerama.so.1 => /usr/local/lib/libXinerama.so.1 (0x801bd7000)
        libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x801dd9000)
        libXext.so.6 => /usr/local/lib/libXext.so.6 (0x801fde000)
        libutil.so.9 => /lib/libutil.so.9 (0x8021f0000)
        libncurses.so.8 => /lib/libncurses.so.8 (0x802404000)
        libthr.so.3 => /lib/libthr.so.3 (0x802659000)
        libm.so.5 => /lib/libm.so.5 (0x802881000)
        libc.so.7 => /lib/libc.so.7 (0x802ab1000)
        libXau.so.6 => /usr/local/lib/libXau.so.6 (0x802e68000)
        libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x80306b000)
        libelf.so.2 => /lib/libelf.so.2 (0x803270000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x803488000)
        libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x8036a0000
```

Every time a new version appears, I must struggle with the configuration files in order that
it continue behaving as I know it since decades. And I used it in machines with few ram. I
suspect, this is bloat. Is it not?


----------



## Geezer (Sep 28, 2021)

ralphbsz said:


> Emacs has rectangular cut and paste.



Yes, very useful for ascii art and such.

But in general, not necessary for the default editor, and very rarely used otherwise.


----------



## Cthulhux (Sep 28, 2021)

hruodr said:


> Every time a new version appears, I must struggle with the configuration files in order that
> it continue behaving as I know it since decades.



Although I can not confirm this, I feel the urge to remind everyone that, if your configuration files break your editor, it's not your editor that is "incompatible".


----------



## hruodr (Sep 28, 2021)

Cthulhux said:


> Although I can not confirm this


Perhaps you do not pay attention to the new "features" and get used to them fast, so that you do not need to turn them off.

The turning off begins with the building:

`configure --prefix=XXX --without-all --with-x-toolkit=no`


----------



## kpedersen (Sep 28, 2021)

bsduck said:


> I think the best solution would be to be able to choose this in the installer at the user creation stage. I mean, both vi and ee are in base (we're not talking about adding stuff) and we're likewise asked for the default shell to use, so editor choice could easily be offered at this point and everyone would be satisfied.


For me it isn't about editor (anything text based is very usable), it is about not cluttering up the installer. Currently it doesn't ask for default shell, default pager or default editor. Those are per user choices.

If you do opt to select "Create user" towards the end of the installer (rather than doing it post install), then pager and editor could be specified along with shell. However these aren't global defaults. This is what the skel files are for.


----------



## bsduck (Sep 28, 2021)

kpedersen said:


> If you do opt to select "Create user" towards the end of the installer (rather than doing it post install), then pager and editor could be specified along with shell.


That's what I mean, indeed.


----------



## zirias@ (Sep 28, 2021)

Geezer said:


> Yes, very useful for ascii art and such.
> 
> But in general, not necessary for the default editor, and very rarely used otherwise.


I disagree. It's one of the features I miss most often when using some editor that's _not_ vim (I don't use emacs). E.g. stripping a common base path from a list of files inside a larger text document, this comes _very_ handy. Nothing you need every day, but definitely from time to time.


----------



## ralphbsz (Sep 28, 2021)

hruodr said:


> Yes. I use rectangular cut and paste from time to time. My problem with emacs:
> _... lots of files in the output of ldd_


To begin with, half the list is display related stuff: All the things that start with libX are for GUI use, and I think a few others too. I don't use the X-windows version, and my executable is only 8.5 MB large (ls -lL `which emacs` -> 8501132). Is using a GUI "bloat"? That's in the eye of the beholder.

And: One man's bloat is another man's functionality. For every library that emacs uses, there is a good reason, namely some functionality of emacs that needs that library. For example, on my machine emacs is linked against libz ... that's because it can edit (read and write) compressed files directly. Some person found this to be convenient functionality.

And the size of the executable and the shared library make little difference. Programs being executed are demand paged, and shared libraries are loaded only on demand and shared among all processes (thence the name). So the size of the executable and the number of shared libraries matters little to performance.



> Every time a new version appears, I must struggle with the configuration files in order that
> it continue behaving as I know it since decades.


There are two questions mixed together here. First one is startup files (the .emacs file in one's home directory, and all the files in .emacs.d that are loaded). It is indeed a problem that some OS distributions like to dump a huge amount of stuff in there; that's typically worse on Linux, in particular on distributions that have been customized for corporate in-house use. All these are things that some people find helpful, but loading them at startup slows emacs down significantly (I even notice that on large, cloud-based machines where I do much of my editing). The fix is simple: Go into those places, and delete unnecessary files, and remove unnecessary lines.

The second question is that emacs seems to be seeing active development, so changes and new functionality will show up. If you don't like that, you'll have to compile your own version from frozen source code.



> And I used it in machines with few ram. I suspect, this is bloat. Is it not?


I run current emacs versions on a Raspberry Pi 0 (with 1/2 GiB of RAM) no problem at all. My main home server has only 3GiB of RAM, and I can do development on it without any problems. For today's environment, those are low-memory machines. I've run emacs since the late 80s, on all manners of small machines. For example, in the early 90s my desktop machine was a NeXT, which had 8 MiB of RAM, and my home machine a 386-40 running Linux on 4 MiB. I used emacs all the time, with no problems. Obviously, these machines had all manner of other problems; for example running X on a 4MiB machine without FPU was painfully slow, and the NeXT's OS had more bugs that a dog has fleas, so I eventually replaced it with a VT220 connected via serial line to a RS/6000, but lack of memory for running emacs was not an issue.


----------



## hruodr (Sep 28, 2021)

ralphbsz said:


> So the size of the executable and the number of shared libraries matters little to performance.


After it is loaded. But if it fills the whole ram, it does matter. 

Do you see how fast sam and acme start? They are also a GUI editors.

And 8.5 MB is also a lot. I think, I ran emacs in a computer with so much RAM. Very few of the new
features I would miss.

BTW. I had to edit with ed some big files that emacs was unable to deal with.


----------



## ralphbsz (Sep 28, 2021)

hruodr said:


> After it is loaded. But if it fills the whole ram, it does matter.


Only the pages that have instructions that are actually executed get loaded.



> And 8.5 MB is also a lot. I think, I ran emacs in a computer with so much RAM. Very few of the new
> features I would miss.


I don't think any computer exists today that has RAM anywhere near 8.5 MiB. They tend to be measured in GiB; the smallest one I know of in current production that runs a full OS would be a Raspberry Pi, and that's 1/2 GiB.



> Do you see how fast sam and acme start? They are also a GUI editors.


I don't have a FreeBSD GUI machine, so I just tried it on my CLI machine (1 GHz Atom, 3 GiB, FreeBSD 12.x): Starting "emacs foo.txt" on an existing file is sub-second, nearly instantaneous to the human feel. No noticeable delay due to bloat here.



> BTW. I had to edit with ed some big files that emacs was unable to deal with.


I regularly edit large log files with emacs, and regularly get the warning "file ... is large, really open". Log files with a tens of thousands of lines, all the time. It is a bit slow to load them, but I don't find any problems. For fun, I just tried it: A log file that's 202 MB, 1.3M lines: starts in about two seconds, and editing feels smooth. I can search backwards and forwards across the whole file, without noticeable wait. (This is the Linux version though, not on FreeBSD.)


----------



## hruodr (Sep 28, 2021)

ralphbsz said:


> I regularly edit large log files with emacs, and regularly get the warning "file ... is large, really open". Log files with a tens of thousands of lines, all the time. It is a bit slow to load them, but I don't find any problems. For fun, I just tried it: A log file that's 202 MB, 1.3M lines: starts in about two seconds, and editing feels smooth. I can search backwards and forwards across the whole file, without noticeable wait. (This is the Linux version though, not on FreeBSD.)


Yes, slow loading, I think I had also other problems. It was many years ago and with a computer of 2000.

BTW, sam is a good alternative to the standard editor (ed):



			http://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pdf
		


But the "best editor" is a question of custom. Sometimes I am unable to name key combinations that 
I continuously type in emacs, it is like a reflex action.

Who wrote with a typewriter on paper, is happy punching cards. Who punched cards, is happy with
a line editor on a teletype. Who used a line editor on a teletype, is happy using it on a VT100, and
much more happy with vi or emacs. But even that seems too difficult for people that never tasted
the teletype or the punching card machines. It must be easy editor.


----------



## grahamperrin@ (Sep 28, 2021)

hruodr said:


> sam and acme



For those of us who are unfamiliar: 









						Sam (text editor) - Wikipedia
					






					en.wikipedia.org
				











						Acme (text editor) - Wikipedia
					






					en.wikipedia.org


----------



## bakul (Sep 29, 2021)

Check out youtube videos on acme & sam: https://www.youtube.com/results?search_query=acme+editor

To use it on unix machines you will need to install plan9ports from ports. I often use `acme` tunneled over `ssh` & it starts up almost instantly (in contrast `xterm` to a mac takes a few seconds). I use `nvi` I have to edit a lot of stuff ("power editing"). For everything else I keep `acme` open on a screen/desktop.


----------



## Deleted member 30996 (Sep 29, 2021)

hruodr said:


> It must be easy editor.


You stating your opinion, like one of which everyone has, like one, is over as far as I'm concerned. 

You're ignored.


----------



## grahamperrin@ (Sep 29, 2021)

Snurg said:


> block marking mode



Whilst seeking the manual page for something in mfsBSD I stumbled across:

LE – editors/le







Interesting, but I couldn't get it to work (and I'm not seeking help).

To anyone who previously mentioned LE: sorry, XenForo disallows seeking things such as this.



bakul said:


> plan9ports from ports



devel/plan9port


----------



## grahamperrin@ (Sep 29, 2021)

hruodr said:


> … Who wrote with a typewriter on paper, is happy punching cards.



I taught myself first on an Underwood – manual, not electric, probably a No. 5.

An Oliver No. 15 helped me to improve the rhythm and coordination of keystrokes:





> Who punched cards, is happy with a line editor on a teletype.



I vaguely recall doing so.



> Who used a line editor on a teletype, …











						File:Teletype-IMG 7287.jpg - Wikipedia
					






					en.wikipedia.org
				




I used one much like that in my first full-time job.

For terminal-based edition, I prefer nano.


----------



## Geezer (Sep 29, 2021)




----------



## hruodr (Sep 29, 2021)

grahamperrin said:


> I vaguely recall doing so.


If you do an error punching a card, you throw it away and write the line in a new card. With the typewriter
you must write the whole page again, not only a line. The teletype is an improvement, because the storage
is not a sheet of paper or a card, you can modify its state with commands, but still you waste paper, and
the way of interacting with it is not very comfortable. Using the same line editor on a terminal you do
not waste paper. Then came more comfortable editors for terminals and graphical displays. But we
will be never happy.


----------



## hruodr (Sep 29, 2021)

bakul said:


> I use `nvi` I have to edit a lot of stuff ("power editing").


I have only a basic knowledge of (n)vi, but I suspect, sam, and acme that has the commands of sam,
is much more powerful, just see the link to the sam tutorial I sent, also the video of Russ Cox on acme
that appears in your link.

If they are more comfortable is more a subjective issue. As said before, it depends also on custom. These
Plan9 programs are mouse-oriented, acme works only on a graphical terminal, sam can be used as a more
powerful ed in a normal terminal, but the taste of ed remains. And I do not like the background colours,
I want a white background.

Analogous is the preference of ee over vi. Probably is vi more powerful than ee, but people find ee more
comfortable.


----------



## Vull (Sep 29, 2021)

hruodr said:


> ... But we will be never happy.


I'm happy. Here's a screenshot of a typical work session, using vim with 4 Mate terminal windows open at once, on 2 monitors. The top 1440x900 monitor shows 2 terminals with 50 lines of code each, and the bottom 1366x768 laptop monitor shows 2 terminals with 40 lines each. If I need to edit more than 4 files at a time, I can use the vi "e" command within any or all of these open terminals, or just start opening additional overlapping terminal windows to my heart's content-- whichever technique I prefer to use at any given time.

I can change the terminal background color to any color I wish. Each terminal has unlimited scrollback, so if I want to use the mouse, I can just `cat` any size file into a terminal window, and copy and paste from one window into the next. If I prefer to use the keyboard exclusively, as I often do, I can "yank" and insert any number of lines at a time with vi's "y" command, into and out of up to 26 buffers labeled "a through "z. With vim's color syntax highlighting to boot, I can type code faster than I could dictate it into a speech recognition program. I've been typing since I was 15 years old and it's second nature. If I want to write a personal letter instead of code, I can use pluma or kate. If I want to write a newsletter or other formatted document, I can use LibreOffice. What could make me happier? I find it hard to imagine any software improvements that could make me s much happier typist than I already am. I've been happy and content with these tools for years.


----------



## hruodr (Sep 29, 2021)

Vull said:


> If I prefer to use the keyboard exclusively, as I often do, I can "yank" and insert any number of lines at a time with vi's "y" command, into and out of up to 26 buffers labeled "a through "z.


vi is an editor for a terminal, but still line oriented as one for a teletype. 
The apparently more primitive sam is superior.


----------



## Vull (Sep 29, 2021)

hruodr said:


> vi is an editor for a terminal, but still line oriented as one for a teletype.
> The apparently more primitive sam is superior.


"vi    is a screen-oriented text editor.  ex is a line-oriented text editor." ~ vi(1)

If you feel sam is superior that's fine. I'm happy enough with vi, not trying to pass judgment on what's "superior."


----------



## kpedersen (Sep 29, 2021)

hruodr said:


> The apparently more primitive sam is superior.


Whilst I personally prefer vi (through years of habit), sam and in particular Acme really do have some cool ideas.

Once tablets seriously evolve from being stupid toys, I really do hope we see Acme get revived. I think it will work very well on a touch environment (possibly the only editor I have seen that can actually leverage touch?). The idea of putting repeat commands, pipes and filters within the window frame itself is actually perfect for tablets (where typing is not a strong point).

Acme could also be a really good candidate for VR. Again, where the keyboard is not a first class citizen but instead some sort of pointing device is.


----------



## bakul (Sep 30, 2021)

hruodr said:


> I have only a basic knowledge of (n)vi, but I suspect, sam, and acme that has the commands of sam,
> is much more powerful, just see the link to the sam tutorial I sent, also the video of Russ Cox on acme
> that appears in your link.


That may be but long before `sam` was available outside of Bell Labs, the `vi` command set was already hardwired in my fingertips! So I can do things faster in vi when a lot of editing has do be done. Even something as simple as a series of redo/undo is significantly faster when you don't have to worry that the pointer doesn't walk off the undo or redo button.


----------



## hruodr (Sep 30, 2021)

kpedersen said:


> Whilst I personally prefer vi (through years of habit), sam and in particular Acme really do have some cool ideas.





bakul said:


> Even something as simple as a series of redo/undo is significantly faster when you don't have to worry that the pointer doesn't walk off the undo or redo button.



Part of the power of acme is that it collaborates good with the system, with tools outside acme. The copy
and paste of the window system using the mouse can be considered part of it. To see how powerful this
is: with commands vi can, in opposition to sam in console, only copy and paste lines. Of course, we want
to use the editor also in the console where there is not that possibility.

The discussion of how powerful an editor is, is in part nonsense. They are limited programs, the only
purpose is to write or modify comfortably a text. Emacs is an exception, contains a whole scripting
language, a from the beginning bad implemented LISP.

I think today everyone can very fast implement his own scriptable editor in the way he means is
comfortable. A scripting language give the building blocks. The text widget in Tk is for example
a ready primitive editor that can be completed with some tcl procedures.


----------



## Paul Floyd (Sep 30, 2021)

grahamperrin said:


> For those of us who are unfamiliar:
> 
> 
> 
> ...


"[Acme] was influenced by Oberon"

Ah, Oberon, fond memories. A beautifully simple language. Blindingly fast compilation speed.

And the System with a tiled GUI, interclicks, multiple entry point applications. I don't remember any shell or command interpreter.



			https://people.inf.ethz.ch/wirth/ProjectOberon/UsingOberon.pdf
		


And it was possible to run the whole thing from a 1.44Mbyte floppy.


----------



## bakul (Oct 1, 2021)

hruodr said:


> Part of the power of acme is that it collaborates good with the system, with tools outside acme. The copy
> and paste of the window system using the mouse can be considered part of it. To see how powerful this
> is: with commands vi can, in opposition to sam in console, only copy and paste lines. Of course, we want
> to use the editor also in the console where there is not that possibility.


Perhaps you should learn vi thoroughly before commenting on it? BTW, I do use acme all the time as I find both useful in different contexts. I prefer keyboard shortcuts to using a mouse but not enough to extend acme (for my personal use). The preference may be due to having used keyboards for a couple decades longer than mice based editors but there it is!

Been through too many editor "discussions" to care much about which editor is more powerful. Use whatever works for you as per your preferences.


----------



## soupbowl (Oct 1, 2021)

In the terminal I use Neovim for most things and Micro for quick/simple editing. With X11 I use Geany and unrelated to FreeBSD on windows I use NotePad++. All of them are powerful editors worth checking out!


----------



## hruodr (Oct 1, 2021)

bakul said:


> Perhaps you should learn vi thoroughly before commenting on it?


I see, there is a difference using ' and ` in the marks. In any case, the basis of the discussions is not knowing enough the editor of the other side.


----------



## scottro (Oct 1, 2021)

Assuming my fonts aren't misleading me, you're showing single quote  ' (shares key with " on a US keyboard) and backtick  ` (shares key with ~ on most  US keyboards). They are different things.  The ` is used, in both C and Bourne shells to run a command.


----------



## Alain De Vos (Oct 3, 2021)

I've done a review of some editors. Good ones:
small: featherpad,geany,leafpad,mousepad,nedit
medium: kate,kwrite,liteide,madedit,xed
large: codeblocks,spyder3
--------------------------------------------------------------------------------------

```
/usr/local/bin/kwrite was installed by package kate-21.04.3
```


```
/usr/local/bin/spyder3 was installed by package py38-spyder-3.2.7_13
```


----------



## grahamperrin@ (Oct 3, 2021)

Alain De Vos thanks,


```
root@mowa219-gjp4-8570p-freebsd:~ # pkg install featherpad geany leafpad mousepad nedit kate kwrite liteide madedit xed codeblocks spyder3
…
pkg: No packages available to install matching 'kwrite' have been found in the repositories
pkg: No packages available to install matching 'spyder3' have been found in the repositories
root@mowa219-gjp4-8570p-freebsd:~ # pkg provides kwrite | grep bin/
…
root@mowa219-gjp4-8570p-freebsd:~ # pkg info --list editors/kate | grep bin/kwrite$
        /usr/local/bin/kwrite
root@mowa219-gjp4-8570p-freebsd:~ # pkg provides spyder3
𡀦…
root@mowa219-gjp4-8570p-freebsd:~ # pkg install featherpad geany leafpad mousepad nedit kate liteide madedit xed codeblocks devel/py-spyder
…
```

– and I found KWrite already present, installed by editors/kate (no separate port)



MadEdit does not respond to its shortcut for Exit.


From your *Writing text* topic:



grahamperrin said:


> I'd like to use Kate, but it lacks support for the character composition keystrokes to which I became accustomed after switching from Mac OS X to FreeBSD-based systems.



The same problem with Code::Blocks, KWrite, LiteIDE, MadEdit, NEdit and Spyder.

xed is free from the problem, so I kept the application then took a closer look at features: <https://github.com/linuxmint/xed#readme>


----------



## Alain De Vos (Oct 3, 2021)

Madedit not answering to Crtrl+Q is a minor issue.


----------



## grahamperrin@ (Oct 3, 2021)

Alain De Vos said:


> Madedit not answering to Crtrl+Q is a minor issue.



It's not a show-stopper, but failure to exit/quit when expected is enough for me to lose interest in an app. 

There's no maintainer, and <http://madedit.sourceforge.net/> "has a problem" so I'll not attempt to report the bug. 

For the greater problem, with Kate: <https://forums.FreeBSD.org/threads/writing-text.80752/post-534595>


----------



## hruodr (Oct 17, 2021)

Any experience with jed?

From pkg info jed:



> JED is a highly customizable text editor offering most of the
> commonly used features of EMACS without the proportions of EMACS.  The default
> configuration uses EMACS keystrokes, though WordStar keystrokes are
> available, and most any keystrokes can be programmed.n  JED is customizable
> ...



And any experience with s-lang?






						S-Lang Programmer's Library
					

S-Lang Programmer's Library



					www.jedsoft.org


----------



## mrbeastie0x19 (Oct 17, 2021)

alright sue me lads but I always liked the og notepad, just gets out your way, shows u the line character, and is nice to look at


----------



## grahamperrin@ (Nov 4, 2021)

Code - OSS



grahamperrin said:


> – not the first time that all open files have disappeared, but this time I'm less hopeful of recovering data.



Following another disappearance, I reported a bug – with an attempt to make things reproducible: 

All open editors lost · Issue #136409 · microsoft/vscode


----------



## baaz (Dec 9, 2021)

micro


----------



## baaz (Dec 9, 2021)

Snurg said:


> My main editor is Kate.
> I like very much that it has block marking mode (toggle between line and block marking modes with ctrl-shift-B).
> This is not only useful for copy/pasting, but also for editing.
> Try marking a block over a few lines and start typing... just cool
> ...


one upan a time that was my text editor too . overally a nice editor  But when I realized they put telemetry in it and kde I diched both And got in a looong journey that made me end up on freebsd (yeah) now my favorite editor is micro and I like terminal editors way more (expect vi )


----------



## hardworkingnewbie (Dec 9, 2021)

You might remember Clippy from M$ Office, and its parody Vigor.





My brain often is quite mushy, and somebody inspired by Vigor wrote a real blend between Vim and clippy. It's being called Kakoune, which is more useful to me than it sounds and way less annoying than clippy, so Kakoune it is, a very much Vim-like editor with many contextual help always on display:






editors/kakoune is even part of the FreeBSD ports collection, so installation is a breeze.


----------



## grahamperrin@ (Dec 11, 2021)

fbsd_ said:


> My favorite is vscode



What's the meaning of a blue down arrow in the list of open editors?



<https://code.visualstudio.com/docs/getstarted/userinterface#_open-editors> does not offer an answer.

Postscript

I noticed the word _Markdown_ in the status bar.

Clicking the status bar at the foot of the window presents a menu at the head of the window.

After scrolling down, there's the icon:



Confusing, because the automatic detection was wrong; it's not Markdown.


----------



## eternal_noob (Dec 11, 2021)

I don't use vscode, but to me it looks like an indicator for a bookmark.


----------



## grahamperrin@ (Jan 9, 2022)

hruodr said:


> … Probably is vi more powerful than ee, but people find ee more comfortable.



Bottom, right: the latter.


----------



## Geezer (Jan 9, 2022)

grahamperrin said:


> Bottom, right: the latter.
> 
> View attachment 12561



Bottom left, I like the multi coloured back lit keyboard.


----------



## Mayhem30 (Jan 23, 2022)

Ash looks promising. Anyone feel like throwing it on to the ports system?









						GitHub - akashnag/ash: A modern terminal text editor
					

A modern terminal text editor. Contribute to akashnag/ash development by creating an account on GitHub.




					github.com


----------



## grahamperrin@ (Jan 23, 2022)

Mayhem30 said:


> … Anyone feel like throwing it on to the ports system?



FAO a maintainer who is known for his generosity: <https://www.reddit.com/comments/o7px9b/-/htv1wm8/>. In response: 



> Will give it a try, thanks.


----------



## facedebouc (Jan 23, 2022)

balanga said:


> The one I use most is the editor built into midnight commander, mcedit. I keep thinking I should learn emacs, but it seems very complicated, and what I do most with an editor is copy and paste a few lines in various configuration files. The frustrating thing about mcedit is that I can't find a way of copying lines onto the clipboard. Pasting works normally.


Under X11 you can select text with <left mouse button + shift key> and paste with <middle mouse button + shift key>


----------



## facedebouc (Jan 23, 2022)

It seems I replied to an old post


----------



## grahamperrin@ (Jan 23, 2022)

facedebouc said:


> I replied to an old post



I don't mind. It's no less a part of the topic than more recent posts.


----------



## Mayhem30 (Jan 23, 2022)

grahamperrin said:


> FAO a maintainer who is known for his generosity: <https://www.reddit.com/comments/o7px9b/-/htv1wm8/>. In response:



Thanks for helping! I hope he's able to do it.


----------



## DenisVS (Jan 23, 2022)

CLI: mcedit
GUI: Geany


----------



## weberjn (Jan 23, 2022)

jEdit  using it for ages, it is kind of getting old, but me, too.


----------



## grahamperrin@ (Jan 23, 2022)

weberjn said:


> jEdit using it for ages, it is kind of getting old, but me, too.



Thanks, editors/jedit, I'm happy enough with old software, however this is amongst the editors that don't accept Unicode character composition or whatever it's called.


----------



## tuxador (Jan 23, 2022)

Doom Emacs with vi like key bindings is the almost perfect text editor for me.
For rapid editing of config files I often use vim


----------



## meaw229a (Jan 24, 2022)

Vi to just edit a basic init file. Kate for some bigger work on the Desktop.


----------



## garaksarr (Feb 2, 2022)

emacs


----------



## mendenlama (Mar 14, 2022)

The first text editor I used was edlin in DOS back in the mid 1980s. Who does not know it: it's some sort of poor man's ed. So ed was kind of familiar to me when I first encountered it. Around 1994 -- still in DOS -- I discovered vim in one of its earliest DOS ports and it became my favourite text editing program. And it remained there since then, about 28 years later. In all kinds of operating systems I came across (DOS, Windows from Win95 to 10, different Linux distros, NetBSD, MacOS, FreeBSD).

In the meanwhile I used also a lot of other editors; e.g. in the late 1990s Emacs (Gnu Emacs as well as Xemacs) became for some time my daily driver, even for reading mail and usenet news (with gnus). But I returned every time to vim. 

So, I can say: vim is the favourite, others serve specific tasks.


----------



## Brian546 (Mar 15, 2022)

I started out by learning vi and I refuse to use anything else. Don't know a thing about emacs or any of those other editors, don't care.

In Windows though it's notepad++


----------



## Cthulhux (Mar 15, 2022)

Brian546 said:


> I refuse to use anything else. (...) In Windows though it's notepad++



May I suggest my website?


----------



## astyle (Mar 15, 2022)

Brian546 said:


> I started out by learning vi and I refuse to use anything else. Don't know a thing about emacs or any of those other editors, don't care.
> 
> In Windows though it's notepad++


in KDE, Kate is pretty much a replacement for notepad++


----------



## Deleted member 70435 (Mar 15, 2022)

vi


----------



## hardworkingnewbie (Mar 15, 2022)

astyle said:


> in KDE, Kate is pretty much a replacement for notepad++


Well, Notepad++ has some sort of cousin under *NIX called notepadqq.


----------



## subnetspider (Mar 15, 2022)

I use vi or nano on hosts I can't install additional software, if I can, I prefer vim.


----------



## covacat (Mar 15, 2022)




----------



## grahamperrin@ (Mar 15, 2022)

Favourite online: maybe Calmly Writer Online.

About: <https://calmlywriter.com/>


----------



## Profighost (Mar 15, 2022)

Vim
I also started to appreciate the advantages of pure vi.

It's hard to get into it. You'll need to force yourself to do it. But it's worth it. 
If you really do much editing, particulary coding, take my advice and at least try it. 
It's not everbody's style, but you cannot figure that out until you've tried. 
The hardest thing about learning vi/Vim actually is not to compare it with other editors. So, throw anything overboard you've learned about any editor you've used before ever. And at least at the beginning don't use gVim, use plain Vim in the shell - _don't use the mouse_ at all. You may be allowed to use arrow and delete keys at the beginning, but mouse is strictly forbidden  Otherwise you will gain no satisfactionary learning effort, cursing only, because you'll try to use vi as other editors, missing the benefits of vi/Vim completely, because the core point of the great efficiency of vi/Vim lies simply within _NOT_ to use the mouse.
Some may really be astonished how d#m*n%&df#k$n speedy you can become...  

[....................................................................................................................................................]


While thumbing through here I saw also something about notebooks. I am not talking laptops or MS notepad, 
I am actually talking *pen & paper*  here.

A couple of years ago I "downgraded" myself, getting back doing two things more:
Writing much more on real paper and banning ballpoint pens for writing and using fountain pens instead - again, like in school 40 years ago  .
As I already mentioned elsewhere here, exercise books and notebooks don't cost much. You get a good fountain pen also as school's learning material for 10...30 bucks (Tip: Keep your eyes open for sales in super markets a few weeks before the new school's term starts.)

There are several points why I can recommend:
Your writing becomes better. 

With a fountain pen your handwriting is much better as with a ballpoint pen (well at least for my chicken scratch )

It's always good to write things down. 
You have saved what you want look up and get it quickly.
You learn better that way.
E.g. I find it's better to write some shell commands down, even if I will never look them up again, because I've learned them that way, than to consult the man page many times. 

Short notes are taken quicker by handwriting than typing - well maybe in most, or at least my case.

But most, when I am in customers meetings I stopped using the laptop for taking the minutes many years ago. (I have it with me, because in some cases it's used. But most of the times it stays closed, and I use an exercise book and a fountain pen to take notes (also looks more professional than notebook and ballpoint )
It may appears more modern when typing into a laptop, but:
- your are quicker to write
- you easily and quickly can do some sketches if needed
- your customers feels more appreciated, because you adress him more instead of looking at a monitor behind a wall and he does not see what you are really doing - if you really listen to him 100%
Afterwards you may send him by mail a clean PDF, Xmind, powerpoint.... whatever... also emphazises you care, what was communicated.


----------



## astyle (Mar 15, 2022)

Profighost said:


> Vim
> I also started to appreciate the advantages of pure vi.
> 
> It's hard to get into it. You'll need to force yourself to do it. But it's worth it.
> ...


The price for that is a cluttered desk full of scribbled-on paper that you don't need any more. You can format a hard drive. Try erasing your own scribbles - it's bad enough doing that with a lead pencil on decent quality paper - erasers generate dust that needs to be vacuumed up or picked up with a wet rag. What if you used a fountain pen? Erasing what you just wrote (just to reclaim the paper) is a pain, you either end up with a torn-up piece of paper that looks ugly on your desk, or (in case of erasable-ink pens, if anyone here remembers them) it would be no better than a pencil.


----------



## bsduck (Mar 15, 2022)

I like paper too. I prefer mechanical pencils to fountain pens. Should we open another thread about our favourite handwriting setup?



astyle said:


> You can format a hard drive. Try erasing your own scribbles


You can take a pile of paper and put it in the trash for recycling. Please don't do it with your hard drive.


----------



## jbo (Mar 15, 2022)

bsduck said:


> Should we open another thread about our favourite handwriting setup?


I'd +1 for that.


----------



## Profighost (Mar 15, 2022)

Well, I don't erase what I've written by hand. That would be dirty, you're right in this point.
I cross out and rewrite, use new paper or Tipp-ex.
As I also do not save everything on my computer forever in one single home or documents directory and search the heap everytime I need something, I do not save every little piece of paper forever. I throw away what I don't use anymore. But on my computer I don't use a "wastebasket". I even have none. I distinguish files to keep (-> NAS) from not to keep (-> rm).
It's all just about organisation.

...but I also would not quote a complete former post either, because this would trash up the place.


----------



## astyle (Mar 15, 2022)

bsduck said:


> You can take a pile of paper and put it in the trash for recycling. Please don't do it with your hard drive.


yeah, when I had an HDD that I wanted to completely destroy - that was way back in 2005, I believe. A 160GB Western Digital out of a "WinXP Home" Dell PC that never saw an Internet connection. The drive had some weird and outdated connections already (which is why that PC was so cheap back then), so it would have been no use to me later on anyway. For whatever reason I had back then, I just wanted to completely destroy it. So, I unscrewed the case, took out the platters, and broke them with a hammer until I was too tired to swing the hammer. After that, I put the stuff into a dumpster. Good luck trying to verify if anything at all existed on those platter fragments, let alone recover anything. Yeah, platters are made with poisonous semi-precious metals, but that's another story. And, most places do have some kind of electronics recycling services if you look around, and don't care too much that your porn stash leaks out.


----------



## Cthulhux (Mar 15, 2022)

I love how this thread has entirely lost its track.

(Unsubscribing.)


----------



## blind0ne (Mar 16, 2022)

Why nano is not the choice?


----------



## astyle (Mar 16, 2022)

blind0ne said:


> Why nano is not the choice?


This thread did not have a poll... and editors/nano was actually mentioned in quite a few posts. I'm too lazy to look, but I think I mentioned nano as my preferred editor in this thread.


----------



## mendenlama (Mar 16, 2022)

At least nano would not look like this (input of German and French into ee):




The funny thing is when I open again the file after saving and leaving, the display of the accents is correct:


----------



## grahamperrin@ (Mar 16, 2022)

mendenlama said:


> … (input …



What method? 

I have the same issue with ee (not with nano) with the Control-Shift-U approach (should I say _Unicode_?) 



> … open again the file after saving and leaving, the display of the accents is correct:



If you curse to the end of the line then use the space bar, does ee present characters that were not input?

Like so (with just one character `…` in the file):


----------



## mendenlama (Mar 16, 2022)

grahamperrin said:


> What method?
> 
> I have the same issue with ee (not with nano) with the Control-Shift-U approach (should I say _Unicode_?)
> 
> ...


Actually I am using a keyboard with German qwertz layout, containing special keys (ö, ä, ü, ß) as well as dead keys for the accent characters (grave, acute, circonflexe). X11 is configured with XkbLayout "de". So I do not need some sort of input method here. 
Terminal emulators used: xterm (the standard xorg one), xfce4-terminal. When I am logging in remotely from my imac with the Mac terminal app it looks the same (using an X86_64 Mac). 

I can reproduce the behaviour with additional characters appearing after the input. This happens after I saved the file, closed ee and reopened again. Directly on the machine as well as by remote access.



Wild guess: there is an issue with the curses library or rather how ee makes use of it, maybe? (n)vi or vim do not have this problem.


----------



## bsduck (Mar 16, 2022)

I never noticed that until now because I rarely use it but you're right: ee can display existing UTF-8 characters fine but completely fails at displaying newly typed ones.
Are you aware of any related bug report or should we open one?

7 years ago:








						EE - base system text editor and UTF-8
					

Good day All!  Friends, whether somebody can tell to me, is any work on support of Unicode in text utilities of base system is conducted?  For example it is impossible to edit the text using the excellent ee editor if in this text there are Unicode symbols. Since we have full unicode aware...




					forums.freebsd.org
				




13 years ago, maybe much older:


> I am releasing ee because I hate to see new users and non-computer types get frustrated by vi, and would like to see more intuitive interfaces for basic tools (both character-based and graphical) become more pervasive. Terminal capabilities and communication speeds have evolved considerably since the time in which vi's interface was created, allowing much more intuitive interfaces to be used.  Since character-based I/O won't be completely replaced by graphical user interfaces for at least a few more years, I'd like to do what I can to make using computers with less glamorous interfaces as easy to use as possible. *If terminal interfaces are still used in ten years, I hope neophytes won't still be stuck with only vi.
> *
> Hugh Mahon


(https://github.com/herrbischoff/ee)


----------



## astyle (Mar 16, 2022)

mendenlama said:


> At least nano would not look like this (input of German and French into ee):
> View attachment 13364
> 
> The funny thing is when I open again the file after saving and leaving, the display of the accents is correct:
> View attachment 13365


What does eternal_noob think of this?


----------



## grahamperrin@ (Mar 16, 2022)

ee (integral to FreeBSD)



bsduck said:


> … Are you aware of any related bug report or should we open one? …



At GitHub: 



> This repository has been archived by the owner. It is now read-only.



There's direction to <https://git.herrbischoff.com/ee/> and: 



> ee — The easy editor. Archived here for posterity.



Whatever's going on in areas such as those: it's a problem with FreeBSD, so please use Bugzilla for FreeBSD. Thanks.


----------



## bsduck (Mar 16, 2022)

grahamperrin said:


> Whatever's going on in areas such as those: it's a problem with FreeBSD, so please use Bugzilla for FreeBSD. Thanks.


Of course, I just quoted the GitHub repository for its README.ee by the original author, which isn't included in FreeBSD


----------



## eternal_noob (Mar 17, 2022)

astyle said:


> What does _*eternal_noob*_ think of this?


I always use nano and i don't think about ee.


----------



## Profighost (Mar 17, 2022)

astyle said:


> This thread did not have a poll..


Tuesday, after


Cthulhux said:


> I love how this thread has entirely lost its track.
> 
> (Unsubscribing.)


wrote I thought, I could start a new thread with this topic - with a poll.
Because Cthulhux is right insofar, because the topic is really a vast field (page 16!) 
And if you want to discuss textdeditors, review them, not only to list their names, the field is way to vast to keep it within "which texteditors are available, and who likes who" - especially if one doesn't want to fuel the Editor war again. 

Many years ago I realized: For my targets in computers I'll need to do much editing, so chose the right editor.
And I've already learned, it's fewer the choice what editor you use, as more to learn to use an editor really good.
So pick a particluar one - chose well - and then really learn it.
Of course, if you are willing to make the effort in teaching yourself a real powerful, complex editor like emacs or vi you want to be sure chosen the right one.
So I started an evaluation process for myself:
1. Which editors there are?
2. Test them a while
3. Pick one and learn it.

Even if you limit point 1 just to free editors only, you'll quickly get a list of 20...30 editors - even more (/usr/ports/editors alone provides way more than 50)
And then you only have the famous, most used ones. Since there is not just vi, emacs, geany, Kate,...
Each editor brought up derivatives and many copys such as "like XYZ, but more/less/slightly other functions/features...."

That's why I recommend first to chose between the basic concepts of vi or emacs.
Even if they are named completely else most today's editors orient themselves at emacs as a kind of role model.
vi provides a complete other, but also extremely powerful concept of textediting.
There are more concepts as those both, but you may run into additional challenges like getting a copy for your OS.

So, to actually being correct you really need to say:
"_First_ find and _pick your_ _concept_ of texteditoring, _then pick an editor_ within this concept and learn it well."

Long story short:
I agree with either of you as with the presumed origin idea of this thread, as it would be useful to
1. summerize, what editors there are
2. discuss advantages, disadvantages, attributes, features...

I fully agree that would be very helpful for anybody who has not found his texteditor yet.
But from my experience I know this cannot be done fully considered by a list of editors only, neither with a forum's thread.
Just to make a list of all editors would need some effort (and I promise, you'll be beaten up immediatly, if you only forget a single particular one! ) and a list would only be the very start.
To make it right, you'll need to describe and compare them, better naming and dividing concepts of textediting, then building family trees... and then you only have one personal flavour of seeing it.....
That's something more for a research project, really. Ending up in a book: "Which editors there are and which I should try"

Otherwise, you end up in what's the most favorite one, only. And this ain't no satisfactory help for someone who already knew the most favorite stuff seldom fits (so one would not use FreeBSD but something more famous 

So, bottom line:
Everybody is at his own to find the best solution for himself, anyway. After all he/she needs to make the decision alone for him/herself.
All others can do about is list what there is, name alternatives, give input about things to think of...
And that's exactly what this thread does.

*I agree, it's grown convoluted. But so is the subject. *


----------



## hardworkingnewbie (Mar 17, 2022)

blind0ne said:


> Why nano is not the choice?


It depends on what you're mostly doing with an editor, obviously. And you've got to take a look at the roots of nano: Pico.

The Pico editor is part of the Pine mail program. Pico was made for doing one job: writing emails, so having a small and easily understandable console editor, because Pine was supposed to be an easy understable MUA. Back in the good old days the competition Pine had was Elm, which had a much much steeper learning curve. This is what Pico has been designed for, as it was shipped aside Pine.

Nano is a re-implementation of Pico under the GNU license, so written from scratch but it mimicks Picos's UI and behaviour. Since then many features have been added which are not in Pico.

So Nano originally is mostly being around writing emails. Of course it can be used for other tasks. But if you are e.g. serious about programming, well, then there are for sure more suitable editors around for that than Nano.


----------



## freezr (Mar 17, 2022)

I like Micro <3


----------



## black_metal (Apr 6, 2022)

Definitely Vim.


----------



## grahamperrin@ (Apr 25, 2022)

mendenlama said:


> … (input of German and French into ee): …



FreeBSD bug 263551 – ee (easy editor) problems with non-basic characters


----------



## grahamperrin@ (Apr 26, 2022)

the standard shortcut for paste is misinterpreted by vi as a command that is not a vi command and there is no mention of the word paste in the man page for vi man oh man what could possibly go wrong


----------



## kpedersen (Apr 26, 2022)

grahamperrin said:


> the standard shortcut for paste


Who's standard? Microsoft's from 1995? In X11, the standard for middle click to paste a buffer will work fine.

Otherwise have you tried 'p' for "paste". Seems fairly intuitive and user-friendly to me. 

You can find more about this in the manpage. Search term: "commands to copy text"
Presumably you got that far to learn how to yank text in to a buffer in the first place?


----------



## a6h (Apr 26, 2022)

In the UNIX Text Processing by O' Reilly, he refers to the 'p' as 'put' command. But I like to think of that, as 'print'. Why?

* In ed(1), 'p' prints the current address -- the implicit '(.,.)' address.
* In sed(1), 'p' prints the 'pattern space' -- the 'pattern space' can loosely be considered as some type of buffer.
* In vi(1), 'p' puts text from buffer -- which implies some sort of non-streaming printing, after all.
* In grep(1), although there's no 'p' option, but the 'p' letter in the name 'grep', comes from sed(1)'s 'g/re/p' -- and, still printing!

To sum-up: take 'p' as 'print', and everything will make sense.


----------



## Profighost (Apr 26, 2022)

Mark text with the mouse and just put it elsewhere with middle mousebutton works fine with vi.
For me that's standard copy-paste.../put/print under FreeBSD. Cannot have it more easy.

It does not work if within a GUI windows the already existing text is automatically marked, which of course overwrites the buffer, and what in my eyes is bad habits derived from Windows.
Point is, MS copied many things from UNIX/unixlike (MS DOS was nothing but an attempt to copy unix' shell but way much lighter), just changed them a bit, to be different (ls -> dir, cp -> copy, etc.) and often worsen them.
Thus bringing many bad habits into computer's world though it all was invented already mostly at its best or at least better.

Now many people reinventing the wheel we already had. Round. Not square, not polygon, but circular, running smoothly.
unix -> windows copies unix  -> unixlike OS copies windows  - that's tremendous cattle fieces!
better: unix -> unixlike, 
not to say: 
simply unix period  

Or in other words: 
Try to get Windows out of your heads. Or at least try to switch your reference. 
Windows is not the role model. 
Unix is. 
Always was. Always will be.

Mostly it's just the question what you're used to.
If you can open your mind to become used of something else, you may experience:
There are so many "old" things, already and still existing under unix you figure out quickly:
"It's easy. It's quick. It's logical. It's intuitive. It's elegant. It's intelligent. It's smart. It's powerful. It's cool."
Well of course, somebody gave it a good thought. But coming from Windows you're simply not used to it.

I also used Windows for many years before I switched to FreeBSD.
But, okay, maybe it was easy for me because before Windows I had Amiga OS and got a better idea of how well things can be done before I faced my first Windows (95) and hated it from the start. Because there were so many things changed worse or done completely cuckoo without any comprehensible reasons.

short:
Don't compare unix with Windows.
Compare Windows with unix!
Else you're putting the cart before the horse.


----------



## Alain De Vos (Apr 26, 2022)

Oneone knows what are the advantages of nvi2 ?


----------



## a6h (Apr 26, 2022)

Alain De Vos said:


> Oneone knows what are the advantages of nvi2 ?



nex/nvi(1) is the the bug-for-bug replacements of  4BSD ex/vi utilities. But nex/nvi(1) was removed from OpenBSD 2.0 and was replace with vim. Then, OpenBSD 2.2 switched backed to nex/nvi(1), i.e. the current version in the base: nex/nvi 1.79, and they keep patching and cleaning-up the 1.79 version. Thus, it's far beyond the old nex/nvi. For example, they're using mkstemp(3) and pledge(2) to make it more secure.

There are two problems: first, it doesn't support wchar_t. Second, it's not compatible with systems which don't support pledge(2) syscall for example. That's why there's also an OpenVi, the portable fork of OpenBSD's nex/nvi(1) which works perfectly on FreeBSD too. For wchar_t support, there's a reimplementation of nex/nvi, which's known as 'nvi2', that is, the 2.2.0 version of nex/nvi, the one that's available in the OpenBSD ports tree.

Right now, I don't have access to a FreeBSD machine, so I'm not sure which is which on FreeBSD. But in OpenBSD you can have them both installed -- beside the vim, and use them separately: using 'vi' command for the 1.79 version in the base, and 'nvi' for the 2.2.0 (nvi2) version from ports.


----------



## bakul (Apr 26, 2022)

a6h said:


> Right now, I don't have access to a FreeBSD machine, so I'm not sure which is which on FreeBSD.


`commit f0957ccae4f402b93cf27b125542343d28b53109
Merge: ebe2785690e3 be3e4646eef6
Author: Peter Wemm <peter@FreeBSD.org>
Date:   Sun Aug 11 20:03:12 2013 +0000

    Update nvi-1.79 to 2.1.1-4334a8297f

    This is the gsoc-2011 project to clean up and backport multibyte support
    from other nvi forks in a form we can use.`


----------



## grahamperrin@ (Apr 26, 2022)

Profighost said:


> short:
> Don't compare unix with Windows.



I didn't.


----------



## Alain De Vos (Apr 26, 2022)

Need smiley


----------



## astyle (Apr 26, 2022)

Here you go:


----------



## Profighost (Apr 26, 2022)

grahamperrin said:


> I didn't.


I know.
I just wanted to add something going further to what you and a6h said.


----------



## _al (Jun 1, 2022)

Multi-Edit - is the best editor for DOS/Windows
vim - is the best editor in the Universe


----------



## Alain De Vos (Jun 1, 2022)

The old "madedit" is a fine editor to work over an ssh connection.


----------



## astyle (Jun 1, 2022)

Alain De Vos said:


> The old "madedit" is a fine editor to work over an ssh connection.


so is nano, and it's easier to use, IMHO.


----------



## _al (Jun 1, 2022)

In the late 90s there was FTE 0.49 editor written by Marko Macek. Very good editor.
I used it on Solaris 2.6 and early Linuxes (such as Red Hat 4.2) before I met vim...

```
lanin@debian2:~/tmp/fte-0.49.7$ head -n 29 README 

                           FTE Kit, Version 0.49.3

                     Copyright 1994-1998 by Marko Macek.
                All rights reserved.

    This program is free software; you can redistribute it and/or modify
    it under the terms of either:

    a) the GNU General Public License as published by the Free
    Software Foundation; either version 2, or (at your option) any
    later version, or

    b) the "Artistic License" which comes with this Kit.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See either
    the GNU General Public License or the Artistic License for more details.

    You should have received a copy of the Artistic License with this
    Kit, in the file named "Artistic".  If not, I'll be glad to provide one.

    You should also have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

-----------------------------------------------------------------------
```


----------



## blind0ne (Jun 5, 2022)

MC is great because of colors. Old school


----------

