Microsoft CLI Editors

Wanted, Dead or Alive: CLI Editor


This article was inspired by the page Wanted: Console Text Editor for Windows, which is very thorough and I strongly recommend that you read it (while you’re at it, put a star in the Github profile of the author, Antoni Sawicki); however, I discovered so many things in the meantime that I decided maybe I can give my two cents about this.
The original article begins with what are also my reasons to investigate this issue:

Since 2012 or so Microsoft is pushing concept of running Windows Server headless without GUI and administering everything through PowerShell. I remember sitting through countless TechEd / Ignite sessions year after year and all I could see were blue PowerShell command prompts everywhere. No more wizards and forms, MMC and GUI based administration is suddenly thing of a past. Just take a look at Server Core, WinPE, Nano, PS Remoting, Windows SSH server, Recovery Console and Emergency Management Services. Even System Center is a front end for PowerShell. Nowadays everything seems to be text mode.
This overall is good news and great improvement since previous generations of Windows, but what if you need to create or edit a PowerShell, CMD script or some config file?

Exactly!
The first time I stumbled upon this need was when I needed to edit a configuration file from a package ported from *NIX - and Notepad didn’t even support UNIX line breaks, so I had to install Notepad++, nothing against it, wonderful application, if only it was multiplatform - but I was left wondering:

What if my only option had been remote access by CLI?

And yes, in the latest Windows (client) there’s the Windows Subsystem for Linux (WSL), with direct access to Windows' native file systems, but also the full set of shells and utilities for *NIX. But there’s no WSL in Windows Server…

Evaluation parameters

I have some criteria that helped me eliminate a substantial amount of candidates:

  • Free and/or for free use, even in professional applications
  • x64 compatible
  • Support *NIX and DOS line endings
  • UTF-8 support
  • Being able to run from an executable with a minimum of installation (not spreading 400 files throughout the system disk, for example)

Test system

The editors were summarily tested in Windows 10, but the installation process documented in this article was done in Windows Server Core 2022 (although there shouldn’t be any big difference in Server 2019).

Simple editor

This type of editors has very basic features, having especially limited Search and Replace, and rarely offering things like syntax highlighting; their purpose is to open a text file, change two lines and close it. Being on DOS/Windows, they should follow the CUA (Common User Access) interface standard, developed for OS/2 and used in all Microsoft applications, particularly EDIT.COM which was released with MS-DOS 5.

EDIT.EXE

The latter is the same EDIT.EXE which is still available in some versions of Windows. But since it’s a 16-bit program, it only runs in x86 versions of Windows. I tested it with version 20H02, which was still made available in x86, but Windows 10 OEM stopped having x86 versions since 20H01, also known as 2004.
Before attempting to run the command, we need to go to CMD.EXE’s Properties, tab Options and enable Legacy Console; then close and re-open CMD.EXE.

When you try to run the executable for the first time, Windows asks for permission to install a library, NTVDM, which is the NT Virtual DOS Machine

After meeting these requirements, we’re able open the good old MS-DOS Editor - but of course it doesn’t work in x64, doesn’t know what *NIX line endings are and can’t even imagine what UTF-8 is, but it’s there…

The last version of Windows Server with x86 support is Windows Server 2008, based on Vista.

YEdit

YEdit is part of the shell utilities package / shell replacement Yori
It’s possible to run YEdit without Yori, but first you need to download Yori, as I’ll demonstrate.
Yori’s installer is just a stub that downloads the latest version directly from the repository; however, although this is a good idea (the installer is always the same and it’s not necessary to rebuild it for each new version), this mode of operation, added to the fact that the installer isn’t signed, makes all anti-malware protections scream (warnings on the browser, SmartScreen, Windows Defender, etc.) if we are in a Windows (Client); but when logged in as Administrator on a Windows Server, nothing happens.
YEdit is compatible with x64 e UTF-8, which is most important, but it is also possible to specify a Code Page (remember those?) to open those files that got left behind in the previous century.
For more information about YEdit, the same author of the original article has made another article specifically on Yedit: Yedit – The missing edit.com replacement for modern Windows
For my part, after solving the installation issues, it runs on Windows x64 and supports UTF-8, so it’s been approved…

Installing

For easier access, these editors can be copied to a folder on the user’s profile like %LOCALAPPDATA%\Microsoft\WindowsApps\; this folder is used by Microsoft to place shortcuts to the actual location of many executables such as winget, Windows Terminal (wt.exe), Edge, etc.
There’s no Microsoft Store on Windows Server but the folder is there just the same and it’s part of the PATH variable.
Download the installer:

1
2
Invoke-WebRequest http://www.malsmith.net/download/?obj=yori/latest-stable/win32/ysetup.exe `
  -O $ENV:UserProfile\ysetup.exe

And install directly:

1
2
$yoripath = $ENV:LocalAppData + '\Microsoft\WindowsApps\Yori\'
$ENV:UserProfile\ysetup -typical -terminal -userpath $yoripath

Obtaining package URLs...
Installing 1 of 4: http://www.malsmith.net/download/?obj=yori/latest-stable/yori-ypm-amd64.cab
Installing 2 of 4: http://www.malsmith.net/download/?obj=yori/latest-stable/yori-core-amd64.cab
Installing 3 of 4: http://www.malsmith.net/download/?obj=yori/latest-stable/yori-typical-amd64.cab
Installing 4 of 4: http://www.malsmith.net/download/?obj=yori/latest-stable/yori-completion-noarch.cab
Applying installation options...
Installation complete.
Success: Installation complete.

Although $ENV:LocalAppData\Microsoft\WindowsApps\ is part of each user’s private PATH since Windows 8, its subfolders are not (and it wouldn’t have been nice to drop Yori at the root of the folder); this why we must add the path where we installed Yori to PATH:

1
2
$yoripath += ';'
$ENV:Path += $yoripath

And finally yedit

Like I said, yedit.exe can be used standalone without Yori, after the latter has been installed; in this case, don’t add Yori’s folder to the PATH - but since we did, let’s undo it:

1
2
3
4
$ENV:Path = $ENV:Path.Replace($yoripath,"")
$yoripath = $yoripath.TrimEnd(';')
cp $yoripath\yedit.exe $ENV:LocalAppData\Microsoft\WindowsApps\
del $yoripath -Recurse -Force

To make everybody’s lives easier, I’ll make available the executable for YEdit 1.70; just drop it on $ENV:LocalAppData\Microsoft\WindowsApps\ or any other folder that is part of your PATH.
yedit.exe v1.70 - (c) Malcolm Smith

86F5437B1BE03C51625A251B7D9193AD

But once again, I recommend that you try the entire Yori package, because it’s really good.

About Yori

A small comment about Yori: I don’t know where Yori has been my whole life, but it’s fantastic. It’s what CMD.EXE ought to have been for 20 years, and is an excellent option if you want a more powerful shell without having to migrate to PowerShell or install 1GB of WSL just to access *NIX shells. Here’s a small sample of the available commands:


Usual disclaimers apply for running external code on a server and getting ourselves used to administration tools that aren’t part of the installation base package.

Wishlist: Tilde

In the *NIX world the opposite just happened, because someone developed a simple editor with the typical Windows' CUA interface, which is more natural for those who move from a GUI to the CLI. This editor is called Tilde and currently does not have a version for Windows.
It would be nice to have two options …

Advanced Editor

These editors are more powerful and have a steeper learning curve than simpler editors like Notepad:

But they usually have advanced functions such as macros, multiple windows, syntax highlighting, plugins, etc.
We’ll start with the classic *NIX editors: Pico (Nano), VI (VIM), JOE e EMACS :

Pico/Nano: 404

The closest source for Pico (the editor for the Pine email program, hence the name - PIne COmposer) should be the official site, but it’s been abandonware for a long time, as long as the university that created it forgot about it.
Not only it hasn’t been updated for MS-DOS since 1997, it depends on installing the DJGPP libraries. That makes two blasts from the past…
As for the FSF clone, GNU Nano, it doesn’t have a binary file for Windows, and the most popular independent build requires installing the Cygwin library to simulate a POSIX environment in Windows; that’s a little too heavy for what I’m looking for.

Micro

However, another clone of Pico, called Micro, can be a good bet:

It’s very young and still under development, it’s written in Go and has versions for OSX, Free/Open/Net BSD, Linux (x86, x64 and ARM), and Windows (x86 e x64)
It works well, has a command bar (Ctrl-E) and the shortcuts are based on the Ctrl key, following the standard of Pico, Nano, etc.
And just as we want for this challenge, the “installer” is just a ZIP with a statically-linked executable.

Installing

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
'Get the link to the latest version'
$latest = 'https://github.com' + `
  ((Invoke-WebRequest http://github.com/zyedidia/micro/releases/latest/ -UseBasicParsing).Links |
  foreach {$_.href} | Select-String -Pattern 'win64')
'Download the ZIP'
Invoke-WebRequest $latest -UseBasicParsing -Out $ENV:UserProfile\micro-latest.zip
'Point to the folder where user executables are placed'
$micropath = $ENV:LocalAppData + '\Microsoft\WindowsApps'
'Extract the archive'
Expand-Archive -Path $ENV:UserProfile\micro-latest.zip -Destination $micropath
'If we never installed Micro before, use this command to extract the path to the executable'
$micropath += ( (dir $micropath | where name -like micro-*).Name + '\;')
'Add this path to the PATH variable'
$ENV:Path += $micropath
'Run the editor'
micro

Micro’s config file is at $ENV:UserProfile\.config\micro\settings.json

VIM

VIM’s Microsoft build (Vi, IMproved) comes in several flavours (including a version with graphical interface called gvim), but what matters to us is the executable for console, which is built for x86 - but we’re not about to open files larger than 2GB, right?
In case you really do need to open files with more than 2GB, Neovim is built as x64 and can be installed basically the same way as follows.

Installing

The process of downloading and “installing” is very similar to what was used for Micro:

1
2
3
4
5
6
Invoke-WebRequest https://ftp.nluug.nl/pub/vim/pc/vim82w32.zip -UseBasicParsing `
  -Out $ENV:UserProfile\vim82w32.zip
Expand-Archive -Path $ENV:UserProfile\vim82w32.zip `
  -Destination $ENV:LocalAppData\Microsoft\WindowsApps
$ENV:Path += ($ENV:LocalAppData + '\Microsoft\WindowsApps\vim\vim82\;')
vim

Vim’s profile is at $ENV:UserProfile\.vimrc.
You can check my proposal for a .vimrc on the DotFiles page on this site.

JOE (Joe’s Own Editor)

JOE is less well-known, but has its fans.
For more information about Joe for Windows, check this page.
Fortunately, it’s available as an independent executable, and even in multiple versions depending on the preferred interface:

Unfortunately, since they’re served from SourceForge, I couldn’t find any direct link for downloading the files in a Windows Server Core-based installation.
On a WinServer with Desktop Experience, a full browser could be used for this; but on a Windows Server Core, we have to install WGET

WGET for Windows

The Invoke-WebRequest cmdlet on Windows Server Core can’t resort to the system’s HTML engine (Trident ou Blink) for complex HTTP requests, like these SourceForge addresses which include redirects. But a command line utility that can do it is GNU WGET, which a kind soul builds and distributes for Windows
We install WGET with the same basic method:

1
2
Invoke-WebRequest https://eternallybored.org/misc/wget/1.21.2/64/wget.exe -UseBasicParsing `
    -Out $ENV:LocalAppData\Microsoft\WindowsApps\wget.exe
wget, by default, is an Alias for Invoke-WebRequest, so we need to call the WGET executable with wget.exe or delete the Alias; in PowerShell 6+ it’s easy because there a Remove-Alias cmdlet, but in Windows PowerShell (the default version on Windows, basically PowerShell 5.1), it’s a bit more complex because that cmdlet doesn’t existe and the Alias have several PowerShell Scopes.
However, while (Test-Path Alias:wget) {Remove-Item Alias:wget} takes care of everything.

wget.exe -h, or wget -h if you’ve done the above:


GNU Wget 1.21.2, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...
Mandatory arguments to long options are mandatory for short options too.
Startup:
-V, --version display the version of Wget and exit
-h, --help print this help
-b, --background go to background after startup
-e, --execute=COMMAND execute a '.wgetrc'-style command
Logging and input file:
-o, --output-file=FILE log messages to FILE
-a, --append-output=FILE append messages to FILE
-d, --debug print lots of debugging information
-q, --quiet quiet (no output)
-v, --verbose be verbose (this is the default)
-nv, --no-verbose turn off verboseness, without being quiet
--report-speed=TYPE output bandwidth as TYPE. TYPE can be bits
-i, --input-file=FILE download URLs found in local or external FILE
--input-metalink=FILE download files covered in local Metalink FILE
-F, --force-html treat input file as HTML
-B, --base=URL resolves HTML input-file links (-i -F)
relative to URL
--config=FILE specify config file to use
--no-config do not read any config file
--rejected-log=FILE log reasons for URL rejection to FILE
Download:
-t, --tries=NUMBER set number of retries to NUMBER (0 unlimits)
--retry-connrefused retry even if connection is refused
--retry-on-http-error=ERRORS comma-separated list of HTTP errors to retry
-O, --output-document=FILE write documents to FILE
-nc, --no-clobber skip downloads that would download to
existing files (overwriting them)
--no-netrc don't try to obtain credentials from .netrc
-c, --continue resume getting a partially-downloaded file
--start-pos=OFFSET start downloading from zero-based position OFFSET
--progress=TYPE select progress gauge type
--show-progress display the progress bar in any verbosity mode
-N, --timestamping don't re-retrieve files unless newer than
local
--no-if-modified-since don't use conditional if-modified-since get
requests in timestamping mode
--no-use-server-timestamps don't set the local file's timestamp by
the one on the server
-S, --server-response print server response
--spider don't download anything
-T, --timeout=SECONDS set all timeout values to SECONDS
--dns-servers=ADDRESSES list of DNS servers to query (comma separated)
--bind-dns-address=ADDRESS bind DNS resolver to ADDRESS (hostname or IP) on local host
--dns-timeout=SECS set the DNS lookup timeout to SECS
--connect-timeout=SECS set the connect timeout to SECS
--read-timeout=SECS set the read timeout to SECS
-w, --wait=SECONDS wait SECONDS between retrievals
(applies if more then 1 URL is to be retrieved)
--waitretry=SECONDS wait 1..SECONDS between retries of a retrieval
(applies if more then 1 URL is to be retrieved)
--random-wait wait from 0.5*WAIT...1.5*WAIT secs between retrievals
(applies if more then 1 URL is to be retrieved)
--no-proxy explicitly turn off proxy
-Q, --quota=NUMBER set retrieval quota to NUMBER
--bind-address=ADDRESS bind to ADDRESS (hostname or IP) on local host
--limit-rate=RATE limit download rate to RATE
--no-dns-cache disable caching DNS lookups
--restrict-file-names=OS restrict chars in file names to ones OS allows
--ignore-case ignore case when matching files/directories
-4, --inet4-only connect only to IPv4 addresses
-6, --inet6-only connect only to IPv6 addresses
--prefer-family=FAMILY connect first to addresses of specified family,
one of IPv6, IPv4, or none
--user=USER set both ftp and http user to USER
--password=PASS set both ftp and http password to PASS
--ask-password prompt for passwords
--use-askpass=COMMAND specify credential handler for requesting
username and password. If no COMMAND is
specified the WGET_ASKPASS or the SSH_ASKPASS
environment variable is used.
--no-iri turn off IRI support
--local-encoding=ENC use ENC as the local encoding for IRIs
--remote-encoding=ENC use ENC as the default remote encoding
--unlink remove file before clobber
--keep-badhash keep files with checksum mismatch (append .badhash)
--metalink-index=NUMBER Metalink application/metalink4+xml metaurl ordinal NUMBER
--metalink-over-http use Metalink metadata from HTTP response headers
--preferred-location preferred location for Metalink resources
Directories:
-nd, --no-directories don't create directories
-x, --force-directories force creation of directories
-nH, --no-host-directories don't create host directories
--protocol-directories use protocol name in directories
-P, --directory-prefix=PREFIX save files to PREFIX/..
--cut-dirs=NUMBER ignore NUMBER remote directory components
HTTP options:
--http-user=USER set http user to USER
--http-password=PASS set http password to PASS
--no-cache disallow server-cached data
--default-page=NAME change the default page name (normally
this is 'index.html'.)
-E, --adjust-extension save HTML/CSS documents with proper extensions
--ignore-length ignore 'Content-Length' header field
--header=STRING insert STRING among the headers
--compression=TYPE choose compression, one of auto, gzip and none. (default: none)
--max-redirect maximum redirections allowed per page
--proxy-user=USER set USER as proxy username
--proxy-password=PASS set PASS as proxy password
--referer=URL include 'Referer: URL' header in HTTP request
--save-headers save the HTTP headers to file
-U, --user-agent=AGENT identify as AGENT instead of Wget/VERSION
--no-http-keep-alive disable HTTP keep-alive (persistent connections)
--no-cookies don't use cookies
--load-cookies=FILE load cookies from FILE before session
--save-cookies=FILE save cookies to FILE after session
--keep-session-cookies load and save session (non-permanent) cookies
--post-data=STRING use the POST method; send STRING as the data
--post-file=FILE use the POST method; send contents of FILE
--method=HTTPMethod use method "HTTPMethod" in the request
--body-data=STRING send STRING as data. --method MUST be set
--body-file=FILE send contents of FILE. --method MUST be set
--content-disposition honor the Content-Disposition header when
choosing local file names (EXPERIMENTAL)
--content-on-error output the received content on server errors
--auth-no-challenge send Basic HTTP authentication information
without first waiting for the server's
challenge
HTTPS (SSL/TLS) options:
--secure-protocol=PR choose secure protocol, one of auto, SSLv2,
SSLv3, TLSv1, TLSv1_1, TLSv1_2 and PFS
--https-only only follow secure HTTPS links
--no-check-certificate don't validate the server's certificate
--certificate=FILE client certificate file
--certificate-type=TYPE client certificate type, PEM or DER
--private-key=FILE private key file
--private-key-type=TYPE private key type, PEM or DER
--ca-certificate=FILE file with the bundle of CAs
--ca-directory=DIR directory where hash list of CAs is stored
--crl-file=FILE file with bundle of CRLs
--pinnedpubkey=FILE/HASHES Public key (PEM/DER) file, or any number
of base64 encoded sha256 hashes preceded by
'sha256//' and separated by ';', to verify
peer against
--random-file=FILE file with random data for seeding the SSL PRNG
--ciphers=STR Set the priority string (GnuTLS) or cipher list string (OpenSSL) directly.
Use with care. This option overrides --secure-protocol.
The format and syntax of this string depend on the specific SSL/TLS engine.
HSTS options:
--no-hsts disable HSTS
--hsts-file path of HSTS database (will override default)
FTP options:
--ftp-user=USER set ftp user to USER
--ftp-password=PASS set ftp password to PASS
--no-remove-listing don't remove '.listing' files
--no-glob turn off FTP file name globbing
--no-passive-ftp disable the "passive" transfer mode
--preserve-permissions preserve remote file permissions
--retr-symlinks when recursing, get linked-to files (not dir)
FTPS options:
--ftps-implicit use implicit FTPS (default port is 990)
--ftps-resume-ssl resume the SSL/TLS session started in the control connection when
opening a data connection
--ftps-clear-data-connection cipher the control channel only; all the data will be in plaintext
--ftps-fallback-to-ftp fall back to FTP if FTPS is not supported in the target server
WARC options:
--warc-file=FILENAME save request/response data to a .warc.gz file
--warc-header=STRING insert STRING into the warcinfo record
--warc-max-size=NUMBER set maximum size of WARC files to NUMBER
--warc-cdx write CDX index files
--warc-dedup=FILENAME do not store records listed in this CDX file
--no-warc-compression do not compress WARC files with GZIP
--no-warc-digests do not calculate SHA1 digests
--no-warc-keep-log do not store the log file in a WARC record
--warc-tempdir=DIRECTORY location for temporary files created by the
WARC writer
Recursive download:
-r, --recursive specify recursive download
-l, --level=NUMBER maximum recursion depth (inf or 0 for infinite)
--delete-after delete files locally after downloading them
-k, --convert-links make links in downloaded HTML or CSS point to
local files
--convert-file-only convert the file part of the URLs only (usually known as the basename)
--backups=N before writing file X, rotate up to N backup files
-K, --backup-converted before converting file X, back up as X.orig
-m, --mirror shortcut for -N -r -l inf --no-remove-listing
-p, --page-requisites get all images, etc. needed to display HTML page
--strict-comments turn on strict (SGML) handling of HTML comments
Recursive accept/reject:
-A, --accept=LIST comma-separated list of accepted extensions
-R, --reject=LIST comma-separated list of rejected extensions
--accept-regex=REGEX regex matching accepted URLs
--reject-regex=REGEX regex matching rejected URLs
--regex-type=TYPE regex type (posix|pcre)
-D, --domains=LIST comma-separated list of accepted domains
--exclude-domains=LIST comma-separated list of rejected domains
--follow-ftp follow FTP links from HTML documents
--follow-tags=LIST comma-separated list of followed HTML tags
--ignore-tags=LIST comma-separated list of ignored HTML tags
-H, --span-hosts go to foreign hosts when recursive
-L, --relative follow relative links only
-I, --include-directories=LIST list of allowed directories
--trust-server-names use the name specified by the redirection
URL's last component
-X, --exclude-directories=LIST list of excluded directories
-np, --no-parent don't ascend to the parent directory
Email bug reports, questions, discussions to 
and/or open issues at https://savannah.gnu.org/bugs/?func=additem&group=wget.

Download JOE with WGET and install it

1
2
wget -c https://sourceforge.net/projects/joe-editor/files/JOE%20for%20Windows/4.6/Standalone/joe.exe/download -O $ENV:LocalAppData\Microsoft\WindowsApps\joe.exe
joe

As you can see, Joe opens a new window instead of using the current window, so it needs to be tested if it will work in a pure remote shell like SSH or PSRemoting; this RDC session isn’t enough.

Testing with OpenSSH

On Windows Server (2022 ou 2019), run the command:

1
Get-WindowsCapability -Online | where name -like 'OpenSSH*'

Name : OpenSSH.Client\~\~\~\~0.0.1.0
State : Installed
Name : OpenSSH.Server\~\~\~\~0.0.1.0
State : NotPresent

The SSH client is installed, so we install the OpenSSH.Server following Microsoft’s instructions:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
Add-WindowsCapability -Online -Name OpenSSH.Server\~\~\~\~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue |
  Select-Object Name, Enabled)) `
{
    Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..."
    New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' `
      -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 `
} else {
    Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists."
}

As we already have the SSH client installed, we can open an SSH session directly in the localhost:

1
ssh Administrator@localhost

The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is SHA256:[…].
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Administrator@localhost's password:
Microsoft Windows [Version 10.0.20348.350]
(c) Microsoft Corporation. All rights reserved.
administrator@WIN-L32NQRNJ5GI C:\Users\Administrator>

And as I suspected, trying to open joe on a pure CLI session, fails.

So, since to use Joe it’s required to be in a Remote Desktop session, in my opinion it’s better to just use Notepad++
As for YEdit, Micro and Vim, they open correctly inside the SSH session.

EMACS

If you really want to use EMACS to edit text files, may I suggest JOE with EMACS interface (jmacs)?
No?
Then the best page I found that can help you is here.
Quoting the original article,

Emacs.exe binary is whopping 83 MB in size and the zip file contains two of them just in case. Whole unpacked folder is 400 MB.

I said that I was looking for small and practical solutions, not for an operating system and programming language that happens to include a text editor ¯\(ツ)

Honorable mentions

The original article included many more editors, but I tried most of them and I ended up abandoning almost every one because they were impractical or incompatible.
Of those who seemed possible and which I tested, I’ll just comment on my impressions after installing them; and since I don’t find them useful for today’s environments (for example, because they don’t support UTF-8), I won’t document their installation.

Open Watcom VI

https://github.com/open-watcom/open-watcom-v2
https://github.com/tenox7/ntutils/tree/master/owvi

The author of the original article went to the trouble of compiling just the editor of the OpenWatcom IDE, and that can be installed from https://github.com/tenox7/ntutils/blob/master/owvi/vi-x64.exe or https://github.com/tenox7/ntutils/blob/master/owvi/vi-x86.exe; the documentation is at https://github.com/tenox7/ntutils/blob/master/owvi/vi.pdf
However, although it seems a good compromise between VI e a menu-based editor (it can be used just like VI, seems to support .vimrc, but has menus), it doesn’t support UTF-8.

Kinesics Text Editor

https://turtlewar.org/projects/editor/
https://turtlewar.org/projects/editor/kit-153-win.exe

Works on multiple platforms, but the Windows installer only works with administrator permissions, which immediately warns us that it is a program from another time…
It is extremely configurable, has advanced features such as selection in column mode (VI visual mode) but also doesn’t support UTF-8
And it hasn’t been updated since 2015.

FTE Editor

http://fte.sourceforge.net/
https://github.com/tenox7/ntutils/tree/master/fte

Won’t run because it needs very old MSVC libraries that aren’t available on a modern Windows system.

Thomson-Davis Editor - TDE

http://adoxa.altervista.org/tde/
https://github.com/tenox7/ntutils/tree/master/tde

The depth of the menus and shortcuts is enormous, it’s an extremely powerful editor, but it also does not support UTF-8…

Final thoughts

After decades promoting system management by GUI, the native CLI editors on Microsoft platforms withered away until they became dead men walking. The last viable one is YEdit, maybe because its programmer hasn’t given up yet (and he seems one hell of a programmer); and YEdit is pretty simple.
But even the amazing Yori CLI utilities package wouldn’t have been successful where Cscript and Kermit weren’t (this Kermit was a port of Korn shell for Windows that Microsoft once considered developing), because the problem was that the CLI had no consistent interfaces with which to interact on a system that is wholly dependent on interfaces like Windows; this only came about with PowerShell and the ideas behind it.

I recommend the book Shell of an Idea - The untold history of PowerShell, written by Don Jones, that explains quite well what was going on inside Microsoft at that time.

The best options end up being the editors from *NIX that have remained updated and that have versions for Windows.
If the lack of support for UTF-8 isn’t a problem, I really liked OpenWatcom VI and TDE.
But my choices are clearly YEdit for quick fixes and Vim for bigger jobs.
Good luck!