I will make a random comparison to latex vs typst (typesetting software). Both incorporate a programming environment, you can write a program right in your document. The difference is that the tex programming environment is a bit unapproachable and not very similar to other languages you may already know, while typst's equivalent is consistent and more similar to languages you know.
Am I the only one who absolutely hates Lua? Its syntax, the fact that variables are global by default unless you local them, `foo = nil` isn't variable assignment but instead variable unassignment!, etc.
There are far better scripting languages than Lua.
But everyone agrees the programming experience in the language is awful.
[1] My son just got into RC planes, so of course I found myself looking at ExpressLRS radios and pulling EdgeTX from GitHub. It's an otherwise straightforward ESP32 board, and there in the app... yup, Lua everywhere.
Simply not true. The power to weight ratio of Lua is amazing. You can keep the entire language in your head easily, and even without LuaJIT it’s crazy fast. It’s great for creating DSLs. As a configuration language it is excellent- in fact that’s how Lua originally came to exist.
But it's still ten times better than Vimscript.
I'm convinced that the reason it's so good is because Lua is simply a better language than VimScript, making it easier to make plugins.
Most editors choke at couple MB, Vis can open 10 Gigabyte text files with zero delay.
I love my Jetbrains IDEs, but you can take my Vim plugin from my cold dead hands :)
And yes, you can also take my VIM plugin (for Visual Studio) from my cold dead hands.
My latest experience with Vim was helping a friend fixing some import with a React Native project. A quick grep on one terminal (I could have used quickfix) and using the vim fzf plugin to quickly locate the file. VS Code could have done this but the context switching and UI clutter is not great there.
As for emacs, the main advantages lies in the fact that so many great tools already exist there. Things like Occur, Shell Mode and Compilation Mode (relying on Comint, a more general feature for anything REPL), Project, Eglot, and Magit.
Typescript dev ex in neovim is light years ahead of what I achieved in Emacs. Neovim’s lsp integration is better than Emacs imo. Blink.cmp is so fast.
Magit is definitely far superior to anything in neovim though and so is org mode.
It's interesting how this design was forced into existence by the extremely limited hardware at the time:
TFA>> It was really hard to do because you've got to remember that I was trying to make it usable over a 300 baud modem. That's also the reason you have all these funny commands. It just barely worked to use a screen editor over a modem.
That's why we got commands like d), d{, D, etc. Trying to achieve the goal in one go, without any intermediate redraws.
Having your concentration broken when you're trying to solve a tricky problem can be a huge productivity drain. So in the end, an editor which may only save a keystroke here and there on average can end up being very productive for some people.
But if the 1980s UI Scientists came back with their stopwatches, I don't think the median vi-mode user would "win". Unless they were using a really slow terminal. (obv, we probably have some 1%ers on HN)
I know that I, personally, would not have been able to take some of the notes I took in university if it weren’t for vim and its affordances. Trying to keep up with a fast-writing math professor while typing a complete set of notes in LaTeX would not have been possible otherwise!
> d), d{
That's not two different commands, it's one action (delete) and two different motions (forwards one sentence, backwards one paragraph). Motions work on their own for moving the cursor, but can be combined with different actions and repetitions to multiply the sentences (commands) you can make. As you increase your vocabulary over time (there are a lot of motions and selectors (which are slightly different but used similarly)) you can keep reducing that friction between thought and screen.
I imagine Vim is only just a local optima too. There are newer editors [0] that are more AST aware that I haven’t been able to fairly evaluate yet (not in the boring corp approved software list).
I would like to select first have a visual feedback of what I selected before taking action on it . Helix and kakuone have got this right .
I often find myself going to visual mode to emulate this.
Personally, I tend to use action-selection for small changes (1 to 3 objects), and selection-action for larger ones (as my brain, I've learned, becomes slower at counting above 3). So "delete 2 words" will be "2dw", but to delete the next 5 words I'll reach out for "v".
This is 1/2 of explaining why vi family is the GOAT. The remaining explanation is that vi family is the only text editor which is able to be used completely without looking at the keyboard or touching the mouse even once. You can not achieve this if you have to use accord commands which are typically binded to what is selected by mouse. No vim-less text editor can ever provide one-click analog of o command (make a new line under the cursor from wherever column the cursor is at the moment of clicking).
It's unbeatable when editing files on a remote server in a hurry and from random places that may or may not have good latency and/or bandwidth.
Can we learn that if you design something for a constrained environment, it will shine when the limitation is lifted?
For instance you don't want to code in assembly Facebook's backend. Blender would also be a completely different program if it was primarily optimized for the 68000. You usually will want different tradeoffs and architectural choices when the target platform drastically changes.
That doesn’t mean it’s actually the fastest tool for the real job. Programming is not text editing
The main divergence of note is tab expansion.
[0] https://edoras.sdsu.edu/doc/BerkeleyDB/ref/am_conf/logrec.ht...
Huh?
While I suppose that one "could" pay for Emacs, the vast majority of users never have.
Then again, I've only been using Emacs for 45 years, so I'm a newbie. (Yes, I started with the Teco implementation.)
> Joy also claims that most of vi's popularity came from the fact that it was readily available and bundled with BSD, while other editors, like Emacs, could cost hundreds of dollars.
Joy was referring to the late 1970s early 80s here and in the context of making VI available when he created BSD and published it for free. Unix operating systems were not freely available outside academia back then.
Of course, TECO is the explicit ancestor of emacs, as emacs was originally implemented as TECO macros. However, I can't find a paper trail giving similar credit to TECO for vi. That said, istuff<esc> is the same in TECO as it is in vi and TECO (1963) well predated vi (1976). RSTS (along with TECO) was used at Berkeley in 1974 before v6 Unix was installed by Ken Thompson on a sabbatical to his alma mater in 1975. Bill Joy started as a grad student at Berkeley that same year. emacs (1976) wasn't ported to Unix until the 80s.
There's no hard evidence and neither Ken Thompson nor Joy has ever mentioned TECO. So I'm probably wrong.
But I still consider TECO to be the ur editor.
Glass TTY terminals were very new in the early 70's. TECO was primarily written to the "Knight TV" system, which was a fancy MMIO framebuffer array hooked up to a PDP-10 that would multiplex a bunch of displays and keyboards. There really was no "terminal" device per se, it was all software. There were other such devices (the MIT one was actually inspired by a similar system at Stanford), but nothing compatible enough to target an editor.
So basically if you were at MIT you'd understand TECO as the pinnacle of editting . But no one else could use it.
By the time Joy started writing vi, the idea of a "terminal" being a serial-connected device speaking a byte protocol with a handful of reasonable operations (position cursor, clear screen, etc...) had solidified. So a portable editor that would work with multiple devices was feasible. Emacs wouldn't get that for a few years yet.
The quick brown fox jumped over the lazy.
The cursor would start before the T. 4C would position the cursor before the q. The 6D would delete quick . Then <esc><esc> would execute the command buffer.These fingers of mine learned TECO before they learned vi and then found vi easier to learn as a result. Besides the basic editing syntax, it was a programmable editor, hence the TECO emacs macros.
Funny thing is that as fondly as I remember TECO, I've tried emacs a few times and have always worked my way back to vi/vim. I particularly like neovim now. I like using ex/command mode for doing bulk editing. Of course you can do the same thing in emacs but I've gotten used to it in vi. I remember programming TECO but I don't remember ever doing programmed editing.
A couple years later, ADM-3A's arrived. And so did a TECO macro that turned TECO into a screen editor! Oh, what joy!
Isn't it a amazing that a macro could turn a line editor into a screen editor?
I also used TECO on my H-11 PDP-11 computer.
[4 [5 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q7-^^6"E @FR%% @O!A! '
Q7-^^7"E Q5< 13@I%% 10@I%% 2R > @O!A! '
Q7-^^8"E Q5P @O!A! '
Q7-^^9"E Q5-1"E ^TU5 ' Q5@I%% @O!A! '
Q7-045"E @^U4%Search: % M6"F @O!A! ' G4 ^Y-2X8 ^YK @O!S! '
Q7-^^."E 0U6 !S! Q5:@S%^EQ8%^[ Q6"N Q6^W ' @O!A! '
@O!A!
'
Q7"D 0U5 < Q5*10+Q7-^^0U5 ^TU7 Q7"D > ' @O!V! '
0U8
Q7-^^A"E -1U8 '
Q7-^^B"E 1U8 '
Q8"N Q5*Q8U5 Q6"E 0U7 .U8 0L
Q8-.%6< 0A-32"L 0A-27"N 0A-9"E 6-(Q7&7)%6^[ -2U7 ' %7 1%6 ' ' C %7 > '
Q5L -Q6U9 0U7 Q6< .-Z; 0A-32"L 0A-13"E 0; '
0A-27"N 0A-9"E 6-(Q7&7)%9^[ -2U7 ' %7 1%9 ' ' C %7 1%9"G R ' Q9; >
0U4 @O!B! '
Q7-^^Q"E @^U4%Command: % M6"F @O!A! ' G4 ^YX9 ^YK @O!C! '
Q7-27"E 0U6 !C! ]4 Q4EU ]4 Q4ED ]4 Q4ET ]4 Q4-10"N ^O ' M9
10U4 [4 ETU4 [4 EDU4 [4 EUU4 [4
^D ET&(128#64#32#1^_)#512#16#8#2ET ED"G 0ED ' -1EU
Q6"N Q6^W ' @O!A! '
Q7-^^R"E G7 @O!A! '
Q7-^^P"E Q4"E .+1U4 ' Q5L Q4-1,.X7 Q4-1,.K G7 0U6 @O!B! '
>
ET#16ET ^^>M5 ^^YM5 23+32^T 0+32^T ^^KM5 13^T
!Z! ]4 Q4EU ]4 Q4ED ]4 Q4ET ]4 Q4-10"N ^O ' ]9 ]8 ]7 ]6 ]5 ]4
Obviously, the TECO programming language was a challenge to understand. Mitigating this is it needed to be extremely compact, as it was used on a 64Kb PDP-11.I'm not sure if that was true.
I vaguely recall it had a line-open / visual mode, like ex/vi, which we didn't use because we were on a dot-matrix line printer / teletype. The ADM-3A had the Ctrl key on the home line; this design made it easy for editors from that period (vi, emacs) to make heavy use of Ctrl.
Thanks to those who posted bits of TECO - I'd forgotten how the character movement was similar to vi. A fellow student in our CS honours year had a semester thesis project analysing the grammar of vi commands and specifying it in a formal grammar. The combination of action x movement is powerful, simple and concise.
Although I had a terminal which could run TECO full screen, I found that too slow and just used it in line mode. You could conveniently reprint surrounding lines by adding a few characters to the end of a commmand (I still have HT <ESC> <ESC> burned into my brain.) The VT52 macro had you typing commands into line 24 like an emacs minibuffer.
I never used it for all my editing, but it excelled at certain things.
The version of TECO we had was the one which shipped with VMS. At some point later on, I think, DEC stopped shipping it, and we migrated to a TECO-inspired full-screen editor developed by another university. Once that arrived, we hard-core TECO users, all 4 of us, were won over within a week.
The TECO macro I posted is the VT52 one.
Also used PFE32 for a while on the Amiga, sad that the source for that never made it out.
[1] I still have Craig Finseth's thesis "A Cookbook for an Emacs" which talks about designing FINE.
I also used PFE32 (on Windows), and for those who may not know, the acronym stood for Programmers File Editor, IIRC :), and the 32-bit version, probably. It was a nice lightweight text editor. One feature it had, that not many other editors might have had at the time, was the ability to open fairly large text files (for that time, at least).
I can't agree more on the beauty of a OS-endorsed scripting language embeddable in every application! Lua might take that role one day...
On the other hand, an Emacs clone (MicroEmacs) actually came with my Amiga 500's bundled extras disk...
Point of order: Minix switched to BSD nvi in 2013 https://github.com/Stichting-MINIX-Research-Foundation/minix...
Not that it matters -- Minix itself hasn't had a commit since 2018 -- but the last five years of its life were spent without Elvis
[1] https://www.rand.org/content/dam/rand/pubs/reports/2008/R217...
Discussion: https://news.ycombinator.com/item?id=17696023 (420 points | Aug 6, 2018 | 259 comments)
Nice read, indeed. Especially the final sentence.
> Also... Emacs sucks!
It always amaze me that I was only introduced to them in my adult life way after Windows, but still for me they are the definition of what computer is.
So this is not really about (personal) nostalgia.
Also in the age of 8K screens, VR, AI and AI ready computers, a lot of people still use and love vi.
Call me crazy but my guess is there might still be vi users in 50 years.
ngcc_hk•15h ago
gustavopezzi•6h ago
herodoturtle•4h ago