21 ms·
Where Vim Came From
- gmiller123456 8y ago>As far as I can gather, Intel HEX files are meant to make binary images less opaque I know this is getting away from the main point of the article, but they're purpose is more to have a standard format that compilers can generate and eprom/device programmers could read without being concerned with the machine's endianness. Pretty much any embedded compiler can produce a .hex file, and pretty much any programmer will read one.
- keithnz 8y agoIt amused me that the hex file was described as esoteric given how prolific they are in the embeded world.
- copperx 8y agoThat brought back memories. When I was a kid I liked to poke around executables in the MS-DOS world. Hex editors were limited in the sense that they wouldn't let me insert bytes into the file, just edit existing ones. Because I didn't have access to an disassembler or an assembler (they were sold at stores but they were too expensive for me), I wrote a simple program that would convert a binary file into a text file full of hex codes, then I could edit that, change jumps to different addresses, change strings, and then I would reassemble the executable with another program to see the effect. I used this to translate programs and games to Spanish by changing the strings in the executable. Messages in Spanish are in average longer than English ones, so I couldn't just use a hex editor. It's funny to me that the hex file format is a real thing.
- keithnz 8y agoit's a bit more involved than just hex.... it specifies address ranges and data that goes into those address ranges + more see https://en.wikipedia.org/wiki/Intel_HEX https://en.wikipedia.org/wiki/Intel_HEX
- phyllostachys 8y agoAnd, unfortunately, it is a destructive process going from elf to hex, as I've discovered a few times. Intel HEX is just the data at what addresses so one looses the section info and metadata from an elf. I'm always happen to see when a uC vendor IDE keeps the elfs and the programmer takes elfs.
- JdeBP 8y agoOne of the things that would have benefitted MS-DOS that came out of the box with OS/2 1.x was a PATCH.EXE , a tool for applying binary patches.
- gumby 8y agoAnd designed to use only printable ASCII characters so the file would not get mangled as it was moved around. Intel hex was one of the original file formats I targeted for gnu bfd (after a.out and coff of course)
- allcentury 8y agoWonderful read, there was a lot of history there I didn't know
- thelazydogsback 8y agoThough e-lisp is great and I appreciate the power and regularity of Emacs, Vi(m)'s mode-full, default cmd-mode editing that doesn't require ctrl + meta + esc left_foot_pedal + wink-wink-nudge-nudge... seems so much nicer to me than insert-by-default editing - thank goodness there are vim plugins everywhere. The TRS-80 Level II line editor was very much in the spirit of "em", along with other BASICs of the day. And perhaps a nod to the even more cryptic Teco.
- ubernostrum 8y agoI'm always kind of curious about comments like this -- it seems everybody knows you have to play games of Twister and hit twelve control keys simultaneously to do even the most basic things in Emacs. But... I use Emacs. I've been using it for almost twenty years. And I'm struggling to think of anything I use regularly the involves hitting more than two total keys simultaneously (keys pressed in sequence obviously don't work as an argument, since that's also how you edit in Vim). I think the only one is query-replace, because it involves hitting Shift to compose the M-% combination. And I don't use a ton of custom keybindings, either. The only custom binding I use that's simpler than the default is goto-line, which I have bound to just M-g. Do people genuinely run into cases where they frequently have to be hitting 3+ keys simultaneously to use Emacs? Or is this just one of those "everybody knows" things that's actually completely false?
- ams6110 8y agoThe default undo binding in emacs (C-_) takes three keys (control, shift, hyphen). I use that quite a bit, but I don't find it burdensome. I also map control to the caps-lock key on my keyboard.
- ppseafield 8y agoC-/ is also bound to undo. :)
- ubernostrum 8y ago
- Izkata 8y agoI see MS-DOS is mentioned near the bottom, but the part I was most curious about was not. When I got my dad's old Windows 3.1 laptop somewhere around 1999, I discovered DOS and started fiddling with it, eventually discovering the "edlin" editor. Everyone else though it was bizarre and hard to use, but I really liked it because I could look at different parts of a file at the same time. The commands were similar to the example given here for ed, but the output much much easier to read. Does anyone know if it was another clone or just coincidence?
- OnerousJewel 8y agoEd, man! !man ed https://www.gnu.org/fun/jokes/ed-msg.html https://www.gnu.org/fun/jokes/ed-msg.html >When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a “viitor”. Not a “emacsitor”. Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!! >TEXT EDITOR. >When IBM, in its ever-present omnipotence, needed to base their “edlin” on a Unix standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard.
- skissane 8y ago> Does anyone know if it was another clone or just coincidence? EDLIN was a clone of CP/M ED. Was CP/M ED influenced by Unix ed? I don't know, but I somewhat doubt it. Gary Kildall's primary background was in IBM mainframe and DEC minicomputer systems (in particular VM/CMS and TOPS-10), and so it seems to me more likely that CP/M ED was influenced by DEC or IBM line editors, than by Unix. That said, Unix and IBM mainframe operating systems share some common heritage. Both were influenced by CTSS. So, it may be that any observed similarities between CP/M and Unix line editors could be due to that shared ancestry, rather than any direct influence of Unix on CP/M.
- enf 8y agoCP/M ED is more in the TECO tradition than anything else, through the DEC influence. It is oriented around characters rather than around lines as the ed family is.
- qubax 8y agoVi?
- earenndil 8y agoQED, ed, ex, vi, elvis, stevie.
- chocolatebunny 8y agoI pressed j on the blog page and was upset that it didn't scroll down.
- elSidCampeador 8y agoThank god I'm not the only one who felt this way
- wruza 8y agoBut why? I’d expect C-E, or at least S-L before j.
- ekianjo 8y agoYeah, it was easy to do and would have been totally appropriate.
- jmcphers 8y agoThere's a way to fix that. ;-) https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en https://chrome.google.com/webstore/detail/vimium/dbepggeogba... http://vimperator.org/ http://vimperator.org/
- kabacha 8y agoand http://qutebrowser.org/ http://qutebrowser.org/
- p2t2p 8y agoCtrl+n, Ctrl+p works out of the box in Safari ;)
- buchanae 8y agoI don't think I could write an editor with regular expressions from scratch in a week. Especially if you took away the internet and 99% of my CPU and RAM. Fail.
- stevekemp 8y agoYet Antirez wrote a cute curses-based editor over a weekend: http://antirez.com/news/108 http://antirez.com/news/108 True it is missing regular expression-support, but it does have find, and many people (including myself) have forked it to added regexps, lua-scripting, and other advanced features.
- ekianjo 8y agoFred Fish! That name brings bad memories of the good old Amiga days.
- gumby 8y agoFred Fish was a great programmer I was quite delighted to work with. We happened to stop by his house on our honeymoon, (although that was because our car broke down in Phoenix, but my wife liked him too). I was sorry when he passed away.
- digitalzombie 8y ago> How did Vim become so successful? I recall the early days of RoR crowd were pushing for Vim too. It was hipster in term of adopting new and awesome things and RoR crowd really push some new things. This was when the editors war was still a thing.
- rco8786 8y agoI’m assuming RoR is Ruby on Rails here? If so, this seems extremely odd considering the age of the two things.
- digitalzombie 8y agoI don't get your statement. But to clarify I was talking about how the crowd in RoR have a high uptick on vim editors. I was reminiscing on the old days of RoR that may have contribute to some more people adopt Vim. A casual google shows this including a poll in 2014: https://www.sitepoint.com/editor-rubyists-use/ https://www.sitepoint.com/editor-rubyists-use/ There's even a quora question too: https://www.quora.com/Why-do-so-many-Rubyists-use-VI-M https://www.quora.com/Why-do-so-many-Rubyists-use-VI-M And a plausible answer "Why rubyists went with vim over emacs could stem from the popular rails.vim plugin from Tim Pope."
- rco8786 8y agoI don’t understand why pushing vim around that time would be considered pushing “new” things is all
- simula67 8y agoOne reason I switched from Emacs was because it took longer to launch
- kornish 8y agoI've launched Emacs once in the last 3 weeks (and it's still running). :)
- 8y ago
- sbjs 8y agoIt's also neat how TextMate syntax files came to be the de facto syntax format that Sublime Text and VS Code use.
- whatyoucantsay 8y agoIt's amazing we have Bill Joy to thank for not only C shell and much of BSD, but also VI.
- h1d 8y agoIt's time to give a spotlight to NeoVim that puts efforts into getting rid of legacy craft while maintaining compatibility to move vi past 50 years of usage. Last time I checked, there's no clear advantage from users' perspective for now but some plugins have started targeting it as the primary platform and also a few GUI are being developed too.
- Annatar 8y agoC shell could have been the de facto standard had the parser not been buggy as hell and had there been proper facilities for stdin and stdout like in Bourne shells. tcsh is my default shell, but I never program in it because of “C shell considered harmful”[1]. I write my programs in original Bourne shell instead for maximum portability. — [1] http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
- j0e1 8y ago> While Emacs certainly still has a following, some people think that the Editor Wars are over and that Vim won.16 The 2018 Stack Overflow Developer Survey suggests that this is true; only 4.1% of respondents used Emacs. I'm an Emacs user for years now and love the editor. But I'm curious about this claim of its poor popularity. The article refers to a piece from http://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruce-Byfield-s-Blog/The-End-of-the-Editor-Wars http://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruc... which bases its arguments on two surveys from 2013 and 2014. Does anyone know of a credible way to measure the popularity of Emacs and what the usage trends are in 2018 other than SO?
- snambi 8y agohttps://www.reddit.com/r/linux/comments/6ihxua/officially_settled_vim_5x_more_popular_than_emacs/ https://www.reddit.com/r/linux/comments/6ihxua/officially_se...
- tmalsburg2 8y agoSelection bias: the crowd on /r/linux is likely not representative.
- nextlevelwizard 8y agoWhy not? Do Emacs users usually use other OS than Linux?
- sshine 8y agoYes, Emacs!
- nextlevelwizard 8y agoPlease provide me with bootable emacs
- 8y ago
- themarina 8y agoYou know x does the same as wq? No need to complain vi made it too long :)
- gumby 8y agoFrom the article: > ...Emacs could cost hundreds of dollars (this was before GNU Emacs) Emacs clones (of various levels of compatibility) for unix and other systems could be purchased back around the time this sentence is set, but to be fair, the original Emacs (or EMACS -- the ITS filesystem only had upper case) evolved by RMS et al from Gene Ciccarelli's TECO init file was naturally free. And Bernie Greenbergs Emacs clone for Multics (called emacs because Multics was case sensitive) was also free (and the first one, as far as I remember, to be written in Lisp).
- trn 8y agohttp://multicians.org/mepap.html http://multicians.org/mepap.html - Greenberg's "Multics Emacs: The History, Design and Implementation" is the canonical Multics Emacs paper. While "emacs" is the command to invoke emacs, it was always referred to as Emacs in the documentation and the program itself. You can use it at https://ban.ai https://ban.ai
- gumby 8y ago> While "emacs" is the command to invoke emacs, it was always referred to as Emacs in the documentation... Multics's use of mixed case used to weird me out. (It was my problem...I eventually got over it)
- thelazydogsback 8y agoI used one called Mince, I believe, on CP/M machines - I think on a Compucolor or Cromemco or something. There was another I can't remember the name of. Ah: https://en.wikipedia.org/wiki/MINCE https://en.wikipedia.org/wiki/MINCE And found this - Lynx friendly as well! http://www.texteditors.org http://www.texteditors.org
- wolfspider 8y agoI still fondly remember lynx it was like the vi version of the web browser. There is an O’Reilly book called “spidering hacks” which goes into some of the advanced stuff. Lynx was the Swiss Army knife which could host, execute, parse, and script web pages in a single command (lynxcgi). It was also decentralized and could run through telnet or raw sockets inside a VMS system. Vi keys and Emac keys were options either of them could be set as the html editor making it seamless.
- fragmede 8y agoSince the article is explicitly about vim (over the original vi) by name, `:x` is a shortcut for `:wq`.
- Annatar 8y agoI still use the original, AT&T vi since I grew up on UNIX and Solaris 2.5.1 was my first UNIX OS after using my Amiga. Even when I’m on a GNU/Linux variant, I run vim by calling vi, primarily because syntax highlighting enrages me to no end. vi won because it came with every UNIX by default, and when one is in a cold server room connected to /dev/console via serial port at 3 o’clock in the morning, one quickly learns to appreciate vi’s ready availability and ubiquity. Emacs on the other hand was always a huge program, was never bundled with UNIX by default, and compiling it on one’s own always ended in failure somewhere around Emacs wanting to compile itself as an Xwindows application. Add to that that Emacs had completely different key bindings and users would have to adapt to it rather than it letting them use their prior knowledge, it was a death knell to Emacs. Later versions added vi key bindings (“evil mode”), but since the pre-built versions continued to insist on Xwindows, it was wholly unsuitable for servers; for example, an SGI Origin 200 or Origin 3000 didn’t even have a frame buffer nor did they need Xwindows, and neither did the hp K-, N-, or L-class servers. Meanwhile, vi continued to be the UNIX system administrator’s trusty friend: always there, with no additional software requirements. Ironically, when I’m on the Amiga I use vim, but there it doesn’t have syntax highlighting which I hate, and so is usable out of the box (I use it as I would vi on UNIX, without any extra vim fluff).
- rounce 8y agoI wouldn't be surprised if a large part of Vim's current popularity stems from EDITOR=vim by default on many distros, despite often having emacs and always including nano. Even over a decade ago when I was in my early teens this seemed pretty common.
- sgillen 8y agoDefinitely a part of it, I’m an emacs user but I’ve been on enough machines that only have vi(m) and that I just need to make a quick edit on that I’ve had to learn the basics of vi anyway.
- arendtio 8y agoI believe vim is a lot smaller, so for many cd-images it is easier to find the space to include it. The quickes way to validate this believe was to look for the Ubuntu package sizes (look at the size (installed)): https://packages.ubuntu.com/bionic/vim-nox https://packages.ubuntu.com/bionic/vim-nox https://packages.ubuntu.com/bionic/emacs25-nox https://packages.ubuntu.com/bionic/emacs25-nox
- zach43 8y agoI’m not sure if that’s actually true...vim has a hard dependency on ‘vim-runtime’ which is actually pretty big (28mb)
- arendtio 8y agoYou are right the dependencies probably have a larger impact, but notice that emacs has a similar package emacs25-common (65mb) in its dependecy tree.
- pseudalopex 8y agoNot counting system libraries, "vim-tiny" is about 2 MB: https://packages.ubuntu.com/bionic/vim-tiny https://packages.ubuntu.com/bionic/vim-tiny
- 8y ago
- z3t4 8y ago"dismissed it, saying that he had no need to see the state of a file while editing it"
- kmgr 8y agoThat's a great read. I'm not a hardcore vim user, but like most devs I bump in to it often enough to get somewhat familiar with its wacky interface. I always had this feeling I'm using a legacy tool (in a nerdy positive way) even though it's relatively young. This article shows that my feeling was quite accurate.
- dosy 8y agoThis is a great historical trace / origin story. And now it all makes sense. But I'm a little disappointed. As someone who came to vim from the world of Notepad / Wordpad / WordPerfect / Word, vim, when I finally learned how to be productive in it, seemed so revolutionary and amazing. I sort of was hoping for a story that justified this feeling, like "Bram had a dream one night where alien greys appeared to him and told him he had a mission for humankind. They then showed him source code for a perfect text editor used in the Aldebaran system for millennia. It's name, they said, would be vim. Bram created it in a non-stop 3 day sprint before expiring for 1 month."
- TeMPOraL 8y agoThis is, in fact, the story behind Lisp Machines. Unfortunately, humans quickly forgot the lessons from the aliens, and made computing the mess it is today. The history is documented here: http://landoflisp.com/ http://landoflisp.com/ (scroll down and follow the arrows).
- dosy 8y agoThis is really hilarious. I am so glad you showed me that. The endless scroll section with the arrows. Great! :D and the music video...hypnotic.
- zaeem 8y agoloved that comic
- pantalaimon 8y ago
- hyperpallium 8y agoPeople think seeing more lines at once - biggers displays, multiple monitors - makes them more productive. Let's compare what the people in this article accomplished and how many lines they could edit at once: C, unix - 1 line BSD unix - 24 lines (Not really fair, as a hardcopy has many lines). > Vim is the most popular text-mode (i.e. terminal emulator) editor I'm pretty sure the vast majority of programming is done in an IDD, not a terminal. > good ideas accumulated gradually over time. ... enjoyed contributions from some of the greatest minds in the computing world. A bigger factor is preseving investment in muscle memory. e.g. The choice of hjkl was not genius (any more than qwerty). But why change once fluent?
- nebulous1 8y ago> Thompson paid a visit to Queen Mary’s, saw the program Coulouris had built, and dismissed it, saying that he had no need to see the state of a file while editing it. Classic Thompson
- xtf 8y agoHow old are regular expressions, when the predecessor of `ed` already got it? Edit: Found it[0] Regular expressions originated in 1951, when mathematician Stephen Cole Kleene described regular languages using his mathematical notation called regular sets. [0]https://en.wikipedia.org/wiki/Regular_expression#History https://en.wikipedia.org/wiki/Regular_expression#History
- Syssiphus 8y ago> Fred Fish was an American programmer that mailed out a floppy disk every month with a curated selection of the best open-source software available for the Amiga platform. Fish disks contained mostly freeware/public domain as far as I remember. Not open-source software.
- JdeBP 8y agoThe name "open source" had not even been coined at the time. "PD" was a popular contemporary prefix for things, although their actual public domain status was legally questionable, irrespective of the FSF's objections to the idea.
- jhbadger 8y agoI'm an Emacs user but I'm really surprised at the number of (presumably, as HN skews young) younger people here using vi or derivatives. Most younger people I know use neither vi nor emacs, using Sublime Text or an IDE or something, but vi seems much more alien to the modern worldview than Emacs, as it a modal editor, which has died out in all but vi-clones these days.
- maxnoe 8y ago26yo astrophysicist / datascientist here. Using neovim since two years now and before vim for 3 years as main editor. I don't know anyone below 40 using emacs. (Neo)Vim using (lots of) plugins has a pretty solid user base around here. Most is Atom / VS Code / Jetbrains IDE but vim has a solid standing especially along the more enthusiast programmers.
- bayesian_horse 8y agoI've been using vim for a long time now. Mainly because I haven't figured out how to quit yet.
- asveikau 8y ago> How did Vim become so successful? They didn't answer this question. The most obvious to me is that Linux distros have had it as the default for decades. If FreeBSD caught on instead maybe we'd have people writing the same article about the amazing history of nvi. This is a weird thing to me. When I was getting started with this stuff, everyone out there acknowledged that vim was a vi clone in the first breath. There are now lots of folks that think vim is the primary thing. Kind of similar to how they call shell scripting "bash". I guess it's rather like asking what brand of Kleenex, or a Coke in the southeastern US.
- 1_player 8y agoGreat article, although the biggest takeaway for me was learning how to use and exit ed. +1 point to my Unix street cred stat. https://www.gnu.org/fun/jokes/ed-msg.html https://www.gnu.org/fun/jokes/ed-msg.html
- calhoun137 8y agoWhen you are learning programming, its important to be able to isolate the problem you are working on and focus on that. The fact is that vim has a steep learning curve, and no matter how fast you are at typing things, your rate of productivity is still limited by how fast you can make decisions and how fast you can think and solve problems. I strongly believe that mastering hotkeys and tools like vim is the final stage of achieving the highest levels of programming skill. This is because once you have learned so much and trained yourself hard to think and move really fast, only then does your productivity bottleneck become things like using the mouse too much, not knowing certain hotkeys, not using things like regex replace, multi-line edit, and so on. The problem is mastering a single tool requires a tremendous amount of investment of time and energy, and once you are at the point in your development as a programmer where you need to start improving on hotkeys, well you are already deeply invested in whatever tool you are using and making the switch to vim has a major cost associated with it, because now you have to learn everything you already know how to do all over again. Is this cost worth it? Sometimes, depending on how advanced a person is, other times, depending on the situation, it's not. I think this phenomenon explains a lot about why vim is not as popular as perhaps it deserves to be.
- godshatter 8y agoI've tried emacs a couple of times over the years, but it never really stuck for me. Not sure why. I use vim as my main editor on the job and at home. The more basic commands have become second-nature and every now and then I go read about something I haven't played with yet and make it part of my workflow. I can't stand IDEs. I understand their benefits, but the amount of resources they take up appall me at some deep level. I'll use them and grumble if I need to. I haven't really liked an IDE since the Turbo Pascal 4.0 days. I also have a thing about not liking software that tries to second-guess me. I'll take a vim session loaded with files and another terminal window to build the project in and I'm golden. Of course, I'm not working on huge projects for the most part. Maybe it's an old-person thing.
- grawprog 8y agoFor some reason i'm not the biggest fan of vim on a computer. But, vim on android with termux is the best editor i've found for android and I don't know why but as weird as it may seem using vim with the right touchscreen keyboard isn't actually that bad. It's the only realy solution i've found for doing small amounts of programming on my phone. Nothing big, but for small hundred line or so, scripts and such vim is definitely the best thing i've found to use on android.