Skip to content(if available)orjump to list(if available)

Using Microsoft's New CLI Text Editor on Ubuntu

felineflock

I appreciate the effort that went into writing the article but it conflates different concepts missing some historical context and technical distinctions.

For example, TUI (text user interface) and CLI (command-line interface) are quite different. "CLI Text Editor" sounds more like someone editing a file using ECHO commands.

This new editor is actually a reimplementation of the classic MS-DOS 5 EDIT program from 1991. At that time, VIM was still very new, so "VIM memes" weren't yet part of the tech landscape.

Before VIM, there was vi. In Usenet posts - about 15 years before Google - people used to add a pithy humorous sentence at the bottom called "tagline" - here is one: "How do you exit vi? Reboot the system."

And Notepad was not the only option for Windows devs. We've had EDIT, DR-DOS EDITOR, Brief, WordPad, EditPad, Notepad++, and more.

bee_rider

Does the exclamation point work in vi, like vim? So the way to exit is to do:

:!killall vi

Of course.

For a cli text editor, ed would qualify, right?

null

[deleted]

pxc

[delayed]

reaperducer

In Usenet posts - about 15 years before Google - people used to add a pithy humorous sentence at the bottom called "tagline"

We always called them "signatures." They were even stored in a file named .sig.

angled

^H^H^H^Hsignature

hiAndrewQuinn

Apropos of the shortcuts here, I always wonder why developers don't go out of their way more often to memorize the Ctrl+C, Ctrl+V, ... shortcuts in use basically everywhere today except the terminal. I believe they stem from the IBM Common User Access (CUA) design standard.

In particular the fact that Ctrl + anything letter-oriented makes something that is word-oriented instead, for example Ctrl + Left Arrow and Ctrl + Right Arrow let you skip word-by-word in documents, and Ctrl + Backspace lets you delete entire words at a time. This feels like it should be way more common knowledge than it is, like how copying and pasting any multiline document into your browser's URL bar will almost certainly format it into a sane single-line format.

kevin_thibedeau

IBM didn't invent this scheme. Apple Lisa had Cmd+X,C,V. Early Mac apps switched to K,C,V but obviously they switched back at some point.

enricozb

Since I do not really use Ctrl-X on the terminal to cut text, I have changed my terminal configs to have Ctrl-X be sigint, and Ctrl-C to be copy. Makes for a nicer experience, also X looks more like a "kill" :)

muixoozie

> like how copying and pasting any multiline document into your browser's URL bar will almost certainly format it into a sane single-line format.

Didn't know that. I learned the other day that one can paste a password into the URL bar and drag it to a password field on the website that's annoyingly blocking paste (on Firefox at least). Probably a bad idea for security reasons (telemetry?). Just found it surprising. Also noticed many crappy sites that block paste will forget to block Ctrl + insert or Ctrl + Shift + v. I usually don't have this problem because the plugin of my password manager usually works..

kule

“Except the Terminal”…

Of course in the Mac you have the same shortcut in every app because you use cmd+c/v

It really bugged me that by default you use ctrl+shift+c/v on Linux but only in the terminal.

Found a lovely feature in kitty term that does the right thing for ctrl+c depending on if you have text selection or not. Works great for me.

sureglymop

Actually, on macOS you have the same shortcuts as gnu readline in any text editing field.

You have these same shortcuts in bash, zsh, the python repl, html form fields, etc. And anything that doesn't use gnu readline can be wrapped in rlwrap.

Note that copying and pasting is an exception. Otherwise, navigating words with shortcuts seems to fairly universally use these shortcuts.

kule

Yep, which is really handy. I was specifically talking about copy and paste shortcuts being the same even in the terminal though.

hbnjgf

Unless you are not using X, selected text us also automatically available for copy using the middle mouse button

jasonjayr

Eons ago, Ctrl-C was mapped to 'Break' on various terminals, which will halt the running program, and was a useful function. Desktop/GUI's mapped Ctrl-C to (C)opy, since the mnemonic made way more sense, and interrupting a GUI program hard like Break tends to do was not very useful.

yoz-y

This is where I find cmd+c/v better. It just works everywhere. On windows win+v works, not sure if win+c does, it’s been a while.

bmacho

Win+c works too on windows. So does ctrl+insert/shift+insert on the terminals I just tested (cmd.exe, microsoft terminal with tabs, git bash, blue powershell terminal).

Win+c/win+v looks like a good compromise, using the Windows button for OS/DE commands, instead of application commands.

whartung

What’s funny is when I started on SCO Unix ages ago, the default break key was DEL.

It quickly morphed into ^C, but the first few months were interesting.

Coming from the VAX, it was ^T.

vintermann

It's not just the mnemonic, it's also that the location on the keyboard makes ctrl-c "prime real estate" so to say, and cutting and pasting is one of the most common and useful things you do.

fc417fc802

Also worth noting that many other ctrl-letter combinations map to signals in the terminal. In all the terminal emulators that I've used shift-ctrl-c & co are mapped by default for clipboard operations.

mprovost

On terminals, the control key masked off the 6th and 7th bits of the 8-bit value sent by the letter key. That's a bitwise AND with octal 037, or in decimal subtracting 96 from the lower case key value. This happens in the terminal (or keyboard) itself, so the computer doesn't see it as two pressed keys, it just gets the masked value. In ASCII 'c' is 99 (decimal), so when modified with control is 3, ETX (end of text), which teletypes used to indicate the end of text. So unix shells reused that control character to terminate the current program with SIGINT. But every letter key maps to a control character at the start of the ASCII range, like 'g' maps to BEL for the bell, or 'h' maps to BS (backspace). '[' maps to ESC (escape) which is handy when Apple decides to move the escape key on their laptop keyboard.

ZoomZoomZoom

> and interrupting a GUI program hard like Break tends to do was not very useful.

I find it extremely useful, GUI or not. Too bad it doesn't work half the time when it matters, especially on Windows.

hiAndrewQuinn

Alt-F4 is pretty reliable on Windows, but it's not as catchy because no one likes craning their left hand to reach the function key (even though you could just hold right Alt).

lupusreal

The mnemonic logic of the copy shortcut is undermined by the arbitrary paste shortcut. Also, from what I've seem a whole lot of average Joe computer users don't know or use these shortcuts, I think they're a lot further to the power user side of the skill spectrum than a lot of people here might expect.

chuckadams

On a US keyboard where these shortcuts were developed, you'd have to stretch your hand across the keyboard to reach Ctrl-P. That's why it's Ctrl-V, it wasn't arbitrary.

I miss Sun keyboards and their dedicated copy/paste keys.

meindnoch

What do you mean? Ctrl+C is SIGINT. Copy is Cmd+C.

fc417fc802

What's cmd? I've only got ctrl, alt, super, and hyper over here. /s

I guess I've also that useless "right click menu" keyboard button that's not even worth repurposing for anything due to the placement making it incredibly awkward to use. I'd be curious to know if anyone here actually uses the ctrl or alt keys that are located on the right.

teo_zero

> I'd be curious to know if anyone here actually uses the ctrl or alt keys that are located on the right.

You must be located in the US, because the US is probably the only keyboard layout with a right Alt key. All the others have an AltGr key in that position.

I use the right Ctrl key in combination with the arrow, Backspace and Delete keys. Also with Return to enter the same content in multiple cells in Excel.

igniuss

A lot of eu keyboard layouts use right alt as alt-gr for special characters. Because of that right control gets a lot of usage since you're using right alt constantly anyways.

mkotowski

Many keyboard layouts use the right alt as the AltGr key for additional characters like language-specific letters or currency symbols (or at least many European ones do).

As for the right ctrl, by association with the AltGr, I usually map it as the Compose key.

mprovost

Hmm my Lisp Machine has control, meta, super, and hyper but no alt!

orthoxerox

I used to use them back when Ctrl-Alt-Del was something you had to press daily.

kgwxd

> developers don't go out of their way more often to memorize the Ctrl+C, Ctrl+V

I get freaked out enough seeing devs that can't touch type. Now you're telling me there's a large number that also don't know the copy/paste shortcuts!?

stronglikedan

One of my juniors could not only not touch type, but would hit caps lock, type a letter, and hit caps lock again - every time they wanted to capitalize a word. They just happened to go on to become the most successful dev I've ever mentored and have now forgotten about us little guys, but I always wondered if they still did that.

Quarrel

I'm more worried that there might be lots of devs that can't send a sigint!

petepete

Also the number who click around to position the cursor when they could hold ctrl and skip there in a fraction of the time. Same goes for shift and highlighting.

vintermann

There are old studies from the 70s showing that moving the cursor with mouse is faster than navigation keys. Tog famously claimed that Apple's internal studies consistently showed that mouse felt slower than it actually is, whereas keyboard navigation felt faster.

lupusreal

I know them but I virtually never use them. I've used X for more than 20 years and almost exclusively use the highlight and middle click method (outside of emacs, in which case I use evil bindings)

FirmwareBurner

>devs that can't touch type.

Hey, that's me :)

Out of curiosity, why is this a yardstick for SW developers? I assumed the more valuable skill of the profession would be critical thinking and problem solving skills, not finger dexterity on pressing buttons without looking. That's why I didn't become a secretary or court stenographer.

I mean, a lot of doctors can't hand write for shit, but is that in anyway relevant to being a good doctor?

What about SW devs with handicaps or mobility issues?

Touch typing feels like a pretty niche hill to die on.

hiAndrewQuinn

It's a signaling mechanism more than anything, as you can see from the other responses here.

"I can touch type" == "I spend enough time writing things on the computer every day that I have invested in the fluidity and comfort of my own hands" == "I'm enough of a nerd to actually be good at my job".

But it's also worth it from an ergonomics standpoint. I learned to touch type over the space of a few weeks of practice, meant years ago, and it's the reason I can use a split ortho keyboard today, which is much nicer on my wrists than the alternatives. I can also keep a notebook between the two keyboard halves which is much nicer to scribble on than having it to the side somewhere.

sureglymop

I would personally say that you should ignore it.

Programming isn't bottlenecked by how fast you can enter or type text, it is about focusing and thinking and then solving a problem. In other words, being able to enter text faster does not imply also being able to solve a problem faster.

I would even say that on the contrary, taking longer and reflecting on what you are typing more may perhaps result in a better quality solution of the problem being solved.

climb_stealth

Consider me amazed! I would have thought it's something people pick up naturally by virtue of spending hours every day working with a keyboard.

I wouldn't link it to competency as a dev.

EduardoBautista

It’s exactly because of having more valuable things to do that you should have typing just be a subconscious act instead of having to take your eyes off the monitor all the time.

CactusRocket

Thoughts go faster than fingers. It's already hard enough to keep up with my stream of thoughts when coding, when I'm touch typing pretty fast. I can't imagine my coding experience if I had to look at the keyboard to input my thoughts into the editor. It's subjective, everyone has a different experience, but I feel I would be severely impaired.

bee_rider

Touch typing is not super useful. I picked it up naturally over time, but it was just an accident. In general, the desire to type fast is a symptom of insufficient automation.

It is sort of nice to turning your laptop screen red and dim, and code on a dark porch at night (OLED screen required to get real darkness). Just you, the vim, and some fireflies. Your eyes will adjust to the darkness, and maybe you’ll see some animals that you don’t normally see.

reaperducer

Out of curiosity, why is this a yardstick for SW developers?

In my college, if you couldn't type 40 WPM, you didn't graduate.

hbnjgf

As a software developer, written communication is your main output -- no matter whether it's code, Mails, documentation or presentations

Unless you are thinking slower than you are typing, you should invest in learning a basic and very easy skill

seabrookmx

I checked this out. It's kind of neat. It's barebones from a programming perspective though.. it didn't seem to have syntax highlighting out of the box for example.

If you want a TUI text editor with CTRL-C/V and mouse support, I'd recommend looking at micro: https://github.com/zyedidia/micro

Milpotel

I used micro for some years but recently switched to https://github.com/craigbarnes/dte. A lesser known, more 90s-like, alternative I used several years ago is ne: https://github.com/vigna/ne/.

pepa65

Craig Barnes is epic. Great, versatile editor, dte.

sheepscreek

Back when I was in school (like junior/middle school), we would program in a DOS based IDE call QuickBasic, and eventually Turbo C++ (in higher grades/high school). That blue background is so nostalgic.

For quick editing, my go to is vim. It’s a real superpower to have if you’re confined to the terminal. However, in the modern post-AI/vibe coding days with super fast AI completions and agentic editing, I think GUIs are the way to go. They make the constant context switching more seamless. Whereas terminal editors work best for very focused zen coding. That’s just my opinion.

jll29

Works like a breeze.

Make sure to add

  alias edit=msedit
to your ~/.profile for full "DOS compatibility".

posix86

I wish they'd port the windows terminal to linux. It somehow allows to use ctrl + c for both cancelling processes and copying text. I'm still sometimes opening dev tools in chrome bcs of the annoying ctrl + shift + c.

drdunce

Although most terminals (stty)/UI wrappers/multiplexers etc. would allow this as a configuration, I believe ElementaryOS and others are deliberately setup out the box to offer a Windows-like experience, including preserving keyboard shorts, without further configuration if this is what you seek.

aa-jv

I wonder if anyone has ever given any druthers to porting PC-Write to linux ..

https://en.wikipedia.org/wiki/PC-Write

I must have written a million lines of code with PC-Write in the 80's .. seems kind of odd to me that it has just disappeared into oblivion, given that its an extremely powerful editor.

Huh, the source is out there somewhere .. might be a fun Lazarus/Free Pascal project one of these days ..

neoden

What font is on the screenshot? https://github.com/microsoft/edit

muziq

moefh

That's not it, the lower case 'a' is very different.

CactusRocket

Could it be Consolas? It would make sense I believe it's the default monospace font on recent Windows.

tedunangst

That sound you hear is all the old men yelling at clouds that a full screen terminal editor is not a CLI editor.

HarHarVeryFunny

Right - if you can't use it on teletype, then it's not a CLI editor.

JdeBP

There have definitely been two so far. (-:

* https://mastodon.social/@cks/114704709419805125

JdeBP

This article is a pile of rubbish from top to toe. Starting with the conflation of TUI with CLI, and ending with the claim that one has to extract it from an archive afresh "each time you want to use it".

Microsoft hasn't designed a new text editor to "avoid VIM memes". It has re-implemented its old EDIT editor, which was a DOS program with a PIF on Windows NT, and which came out with MS-DOS 5 in 1991. There weren't silly "VIM memes" in 1991. Indeed, Stevie had barely turned into VIM in 1991.

The original announcement was discussed on Hacker News about a month ago.

* https://news.ycombinator.com/item?id=44031529

And the idea that "Windows devs are forced to fire up Notepad" is just risible. Even by 1991 there was a wide array of text editors available in the Microsoft world. EDIT was over half a decade late to the party. DR-DOS had had EDITOR for a while. And if memory serves E and T2 were already in IBM's PC-DOS and OS/2.

* https://news.ycombinator.com/item?id=44041533

It was pointed out back in 1991 that it was late to the party. Quite how someone from the world of Ubuntu can think that there are no text editors in the Windows world in 2025 apart from Notepad and so developers are "forced", its word, to use it, boggles the mind.

* https://news.ycombinator.com/item?id=44037559

Anyone who actually does Windows development, and has probably discussed with other developers the merits of the various editors available, from MobaEdit through EditPad, WordPad, Brief, CodeWriter, and many others to Notepad++, would question the apparently zero knowledge that has informed this piece.

null

[deleted]

s1mplicissimus

was that the sound of a bicycle falling over or was it MS doing EEE (embrace, extend, extinguish) as usual?

null

[deleted]