News: 1702391654

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Microsoft floats bringing a text editor back to the CLI

(2023/12/12)


Microsoft is considering adding a text editor back into the command line world, thus risking some heated discussions on the subject.

Connor Plante, a Microsoft product manager, began a [1]discussion regarding the feature in GitHub last week. Plante asked if users would even want such a thing if they are using a Command Line Interface (CLI) editor today, and if so – what?

The problem is that 64-bit Windows editions – the standard nowadays – do not ship with a CLI editor. Edit has lingered on in the 32-bit world, according to Plante, but for 64-bit users, there is nothing available out of the box.

[2]

Plante said: "A CLI editor is a core tool for system admins, developers, and power users – providing an immediate viable option here is an important quality-of-life improvement."

[3]

[4]

Since Microsoft's [5]recent updates to notepad.exe have left Windows bereft of something simple for text wrangling, we'd have to agree.

There are some [6]excellent text editors out there for Windows, but options are limited with regard to the command line. Plante suggested bringing edit to 64-bit Windows or going for the likes of Pico, Nano, Vim, or Emacs.

[7]FTC wants Microsoft's relationship with OpenAI under the microscope

[8]Microsoft to intro dedicated mode for Cloud PCs

[9]Messed up metadata could be to blame for Microsoft's Windows printer woes

[10]Microsoft's code name for 64-bit Windows was also a dig at rival Sun

Edlin did not make the example list. A shame – this writer well remembers carefully crafting autoexec.bat and config.sys files in the tool to ensure the latest and greatest DOS-based software would boot without issue. Edit came along from MS-DOS 5 and lingered on throughout 32-bit x86 versions of Windows.

An alternative approach floated by Plante is to improve error handling in the shell so that it recognizes editor commands and prompts to install the missing services.

[11]

The discussion in GitHub has been lively. However, we'd contend that most administrators likely already have a preferred tool and will install it regardless of what Microsoft does or doesn't elect to include.

If those same administrators are using Windows as a client to get to their Linux consoles, plenty of options exist, depending on the distribution.

Still, getting some sort of text editor into the CLI would be handy for the occasional user, such as this writer. Just to avoid the lurch into Visual Studio Code or Notepad++. The question, however, has to be Emacs or Vim? Or both? ®

Get our [12]Tech Resources



[1] https://github.com/microsoft/terminal/discussions/16440

[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2ZXiRuGRUWITe0I6mJQExPwAAAMY&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZXiRuGRUWITe0I6mJQExPwAAAMY&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33ZXiRuGRUWITe0I6mJQExPwAAAMY&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[5] https://www.theregister.com/2022/01/06/notepad_update/

[6] https://www.theregister.com/2023/12/06/veteran_editors_notepad_and_geany/

[7] https://www.theregister.com/2023/12/11/microsoft_openai_investment_ftc/

[8] https://www.theregister.com/2023/12/08/windows_goes_dedicated_for_cloud/

[9] https://www.theregister.com/2023/12/08/messed_up_metadata_to_blame/

[10] https://www.theregister.com/2023/12/07/64bit_windows_code_name/

[11] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZXiRuGRUWITe0I6mJQExPwAAAMY&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[12] https://whitepapers.theregister.com/



katrinab

The answer to Emacs or Vim, I think, is No.

Nano is GPL which I think rules it out for the base image of Windows. Same applies for that matter to Emacs. Vim has its own licence, which appears to be a GPL-compatible copyleft licence.

So either Pico, or Edit. I don't think there was anything particularly wrong with Edit.

juice

> The answer to Emacs or Vim, I think, is No.

Tch. Vi is the One True Editor! Though I can imagine the carnage if a bunch of unsuspecting techies were presented with in a Windows CLI...

Yet Another Anonymous coward

I think you misspelled 'ed'

katrinab

winget install vim.vim, or neovim.neovim; if you are that-way inclined.

winget install GNU.Emacs if you are the other-way inclined.

I just don't think either should be the default.

EDLIN?

Alan Bourke

Pfft, lightweights. I still use COPY CON to this day.

Want a modern console text editor for Windows?

Micro: https://micro-editor.github.io/

Re: EDLIN?

Yet Another Anonymous coward

Not a butterfly?

https://xkcd.com/378/

A Non e-mouse

Oh how I wish they're replicate the unix shell tab-autocomplete method rather than the brain-damaged Windows way.

What like Powershell's tab autocomplete?

Alan Bourke

Or is that different?

Re: What like Powershell's tab autocomplete?

collinsl

It's different - in Linux if you double tab it'll list all available options for the partial input you've provided so far, in Windows it cycles through them one at a time and takes bloody ages to compile the list in the first place.

Re: What like Powershell's tab autocomplete?

Mr Fix.

ctrl-space does this in powershell.

Peter Gathercole

This is a shell feature, not a UNIX/Linux feature.

I'm pretty certain that what you are describing is a Bash feature. While ksh (the most recent 'standard' UNIX shell) does have autocompletion, it works differently still, and depends on whether you are in vi, emacs or gmacs editing mode.

TECO!

Bitsminer

Enough said.

vax/vms eve?

andy the pessimist

Vi would be easiest for me.

Emacs is ok

A blast from the past eve would be nice.

Re: vax/vms eve?

Alan J. Wylie

A blast from the past eve would be nice.

Complete with a free pot of gold paint.

Anonymous Coward

Why not? Even on windows you may still want to nip into a config file every now again without having to go and open it from the window if already in the folder. Same goes for when programming say Python for example if you just want to change one or a few lines you don't want to have to fire up your IDE just for that. Having said that I haven't installed one so I probably don't really need it as most of my python is done in the terminal on Linux (as root because I like to live dangerously).

b0llchit

To paraphrase another computer and OS pusher:

You are installing it wrong,... if you need an editor.

Nuff said ;-)

nano

Missing Semicolon

FTW.

It has zero learning curve, and is good enough for config files and small-to-medium scripts.

Re: nano

Yankee Doodle Doofus

Agreed. Nano is my go-to. I've used most of the other popular options at least once, but never put in the time to try to become proficient in any of them. I just occasionally need to edit a config file or script from the CLI, I don't live there.

edlin+

JoeCool

Edlin was useable but never quirky enough to generate devotion.

I did appreciate the idea of an embedded facility with _just_ enough functionality to get 80% of jobs done, with 60% programmer satisfaction.

In that spirit how about a screen editor with basic functionality and personality modes to emulate the supported vim, emacs, notepad. etc. key and command mappings.

Optionally a plug-in system if customization/specialization is a must have.

Failing that, MS could win a lot of accolades by partnering with VIM and helping it continue.

mixed emotions:
Watching a bus-load of lawyers plunge off a cliff.
With five empty seats.