Where Vim Came From
August 6, 2018 4:34 PM   Subscribe

In some sense, Vim is only the latest iteration of a piece of software—call it the “wq text editor”—that has been continuously developed and improved since the dawn of the Unix epoch. 2500 words from TwoBitHistory.
posted by cgc373 (74 comments total) 35 users marked this as a favorite
 
I use Vim every day at work. In response to Bram Moolenaar's plea (on the Vim splash screen) to aid poor children in Uganda, I began contributing to the Oxfam; been a regular contributor ever since.
posted by SPrintF at 4:53 PM on August 6, 2018 [8 favorites]


TIL that Vim was originally written for the Amiga. Today is a day of joy!
posted by grumpybear69 at 4:58 PM on August 6, 2018 [13 favorites]


For years my default *nix editor was ed, but in a bind I could make do with vi ex...
posted by jim in austin at 5:00 PM on August 6, 2018


Holy cow! What a great essay and a great site.

Note that jk will let you scroll through Metafilter as well.

The basic Emacs commands C-a, C-e, C-f, C-b, C-n, C-p aren't quite as widespread, but they are built into MacOS and work on essentially any text box.
posted by vogon_poet at 5:01 PM on August 6, 2018 [12 favorites]


My secret personal Vim fact is that in FPS video games I don't use WASD, but ASDF, with 'A' for going backwards and 'F' for forward, in a kind of reverse vi/vim setup on my home row.

For years my default *nix editor was ed

Well, ed is the standard editor.
posted by rhizome at 5:05 PM on August 6, 2018 [9 favorites]


I've been an exclusive vim user for 9 years but still feel like I have much to learn. Not sure if that's good or bad.

I'm surprised at the Stack Overflow survey showing 25% of respondents use vim. I would have guessed more like 10%. I see way more people using Sublime or IDEs.
posted by scose at 5:07 PM on August 6, 2018 [1 favorite]


Just yesterday in a tutoring session a student of mine was at a complete loss because some command had dumped her into vim automatically and she had no idea what to do or what to even search for because the whole situation was just completely opaque.

I suppose it's a rite of passage.

In 2018 vim still clearly has its place (such as the top of the SO poll apparently) but I would be very happy to never see it as the default for anything ever again. It's the PC Load Letter of *nix editing.
posted by traveler_ at 5:12 PM on August 6, 2018 [11 favorites]


I learned vi because it was the only screen editor guaranteed to be installed on every flavor of Unix, and back in the early 1990s, there were a bunch of them I had to deal with. SunOS, AIX, Ultrix, SCO, Solaris, Venix, AT&T Unix, HP/UX, BSD, and of course Linux which eventually ate them all (more or less).

First you hate vi (modes, what?). Then you mearly dislike it. Then you can take it or leave it. Then you start reaching for it. Then it becomes your editor of choice. You switch your email client to use vi to compose email.

Or at least, that was my journey.
posted by fings at 5:15 PM on August 6, 2018 [13 favorites]


I've been using vi or vim since I guess about 1987. Once upon a time, I wrote a video game for linux, ostensibly about the editor wars, called "Word War VI"
posted by smcameron at 5:28 PM on August 6, 2018 [3 favorites]


While Emacs certainly still has a following, some people think that the Editor Wars are over and that Vim won.

To crush the keys. To see text driven before you. To hear the lamentations of the newbies.
posted by benzenedream at 5:43 PM on August 6, 2018 [31 favorites]


I mean, maybe I'm not plugged in enough to the youth developers of today to be 100% sure, but I would say generally that if there was a winner in the editor wars, Emacs was not it. That's not to say vim has necessarily won out to a great deal, but it has been rarer each year to find anyone who uses Emacs primarily (or at all).

For me? Eh. Vim's OK, I tend to use a more complete IDE personally. It's also really dumb that it's the default on systems that surely have the extra space (even embedded systems) for something easier to explain to newbies like nano.
posted by tocts at 5:47 PM on August 6, 2018 [1 favorite]


First you hate vi (modes, what?). Then you mearly dislike it. Then you can take it or leave it. Then you start reaching for it. Then it becomes your editor of choice. You switch your email client to use vi to compose email.

Or at least, that was my journey.
There are further steps.

I do not know, myself, how much further the road may go, but I can look back to where you stand from my current vantage point at "refuses to accept new work laptop until Apple reverses their misguided elimination of a physical ESC key."
posted by Nerd of the North at 5:47 PM on August 6, 2018 [14 favorites]


Vim users may enjoy neovim, which is is basically Vim Improved (or I guess vimim).

Vim definitely won, in a sense, but it's not like people have stopped using Emacs. But, notably, more and more Emacs users are choosing to install packages to let them use Vim keybindings.
posted by vogon_poet at 5:51 PM on August 6, 2018 [1 favorite]


Emacs user here to the end. But then too, when programming, I use vi/vim on a daily basis. Just don't require me to use one of those bloated IDEs.
posted by Death and Gravity at 5:55 PM on August 6, 2018 [2 favorites]


I mostly use Intelij with vim mode enabled these days but I can't imagine coding without vi keybindings. It's the way that my fingers think.
posted by octothorpe at 5:57 PM on August 6, 2018 [4 favorites]


"refuses to accept new work laptop until Apple reverses their misguided elimination of a physical ESC key."

and where's the META key?
posted by thelonius at 5:58 PM on August 6, 2018


I always swap Ctrl and Alt on my Apple laptops because I need a Ctrl key on both sides for effective vimming. This plus vi keybindings in the terminal and the IDE means I'm always apologizing whenever someone else tries to do anything on my computer.
posted by jomato at 6:16 PM on August 6, 2018


custom foot pedal for meta key obvs
posted by benzenedream at 6:21 PM on August 6, 2018 [14 favorites]


I mostly use Intelij with vim mode enabled these days but I can't imagine coding without vi keybindings. It's the way that my fingers think.

Back in the mid-80's the cool thing in college was using Emacs, because it was something totally different. A tool to build an environment in. Then I did a couple of years in the PC/Windows world. Paradox and Turbo Pascal for Windows. Then I spent a decade in insurance and finance, starting on sco, transitioning to Linux, and vi/vim was there the whole way.

Fast forward to a gig last year, where the in-app editor would discard changes on an [Esc]. SO frustrating to muscle memory, leave insert mode, and throw away all the changes.
posted by mikelieman at 6:25 PM on August 6, 2018 [3 favorites]


Lotus Notes closes the document that you're writing when you hit the ESC key, it's maddening. Fortunately, I haven't had to use that horror since I left the employ of Big Blue (who might be the only company left that uses it).
posted by octothorpe at 6:39 PM on August 6, 2018


Note that jk will let you scroll through Metafilter as well.

holy shit this changes everything
posted by dubitable at 6:42 PM on August 6, 2018 [11 favorites]


The esc key make things difficult. Thank heavens for remapping. ;; or jj for the win.
posted by lhauser at 6:45 PM on August 6, 2018


Amusingly enough, my start with vim begins with Microsoft. Keep in mind that they were an AT&T licensee and ported Unix to Intel as Xenix before MS-DOS ever shipped.

When I worked there in the late 80s/early 90s, Microsoft maintained an internal set of Unix utilities that ran on both DOS and OS/2. Their fork of vi, maintained by one peteo if I remember correctly, had many of the features that were later added to vim—multiple buffers, split screen windows, that sort of thing.

When I left Microsoft I missed that enhanced version of vi and ended up porting vim to Win32 shortly after it was released. It was a huge step up from the other viable (pun intended) options of the era. It remained my default editor for a long time, though I'd say I use VS Code more often now.

Ah—the heyday of the editor wars, when we could still laugh about EMACS meaning Eight Megabytes And Constantly Swapping because 8MB was an unreasonable large amount of memory.
posted by bcd at 7:02 PM on August 6, 2018 [3 favorites]


FTA: Today, according to Stack Overflow’s 2018 Developer Survey, Vim is the most popular text-mode (i.e. terminal emulator) editor, used by 25.8% of all software developers (and 40% of Sysadmin/DevOps people).

If you're talking about text-mode editors, those figures match up with what I've observed.
posted by Aleyn at 7:14 PM on August 6, 2018


That's not to say vim has necessarily won out to a great deal, but it has been rarer each year to find anyone who uses Emacs primarily (or at all).

As somebody sort of mentioned indirectly, the future of Emacs is probably packages that a.) make it a competitor for Sublime/Atom/VS Code extensible editors and b.) offer a VIM interface mode (a much better one than Sublime does, let me tell you)

(okay it was already competing in terms of extensibility but I mean in terms of ease of extensibility)
posted by atoxyl at 7:25 PM on August 6, 2018


Yeah, in my day-to-day experience, it definitely seems like Vim already won the text-mode editor battle, but I think that text-mode editors lost the overall editor war. Personally, Sublime hits my sweet spot for letting me hop easily between languages, and add packages as necessary and thus have the pieces of an IDE that I desire, but most of the people I've seen entering the profession in the last couple years are using IDEs of some stripe.
posted by protocoach at 7:47 PM on August 6, 2018 [2 favorites]


meh, ESC == Ctrl-[ (pinky power!)

I don't even remember my first text editors, something on Apple II or IBM PC (edlin? TurboPascal, WordPerfect?). Then there was 'ed' on 132 column teletype consoles, and vi for VT100's, and stevie/nvi/vim for my Amiga 1000 (expanded to 4MB 68020/68881 @ 16MHz 80M SCSI).

Now it's mostly nvim which leapfrogged over vim for a while in features (async process and lua and better API hackability ). But now maybe vim 8 has caught back up.

ed/vi/vim is probably why I tended to programming in Perl... same sort of incomprehensible yet powerful with a learning curve that goes on forever. Like a moth to a flame powerful. Like black magic incantations powerful. Like bend this thing to my will powerful. Like scream a spell from your fingertips and make the world change powerful.
posted by zengargoyle at 7:51 PM on August 6, 2018 [5 favorites]


... I just came in to remark about the feeling when something you lived through is classified as "History".

(I mostly use Sublime these days locally, but I kinda wish it had vi key bindings, and vim whenever i'm in a screen session remotely, where i can never remember the overly clunky vim method for column editing and often just resort to programming it ex style.)
posted by Xyanthilous P. Harrierstick at 8:00 PM on August 6, 2018 [1 favorite]


In a terminal emulator, vim wins out because you never can predict how alt/meta will be captured locally. I have a mixed relationship with vim because in spite of using it to plow through multiple dissertation drafts back in my misspent youth, only about a half-dozen keys actually stick. I think I finally gave up and started defaulting to nano in the terminal.

I'm one of the 4% who use emacs. The killer features for me are working spellcheck, a mostly sane extension language that doesn't involve excessive boilerplate, dired, org-mode, great support for REPL languages, and an internal shell for quick commands. Sublime hits all of those requirements but I feel guilty in not buying a license for three different computers, and then I'd have to rewrite all of my automation in python.

I'm perpetually unconvinced by the ergonomic arguments. Maybe it's because I learned to touch type on actual typewriters were the worst habits that people complain about were impossible unless you had the flexibility of John Lee Hooker and the strength of The Incredible Hulk. Maybe it's because I have just enough musical experience to appreciate how Victor Wooten's hands are always in the perfect position for the note he's playing. Or maybe I've done enough usability studies to know that micro-level hacks are generally BS.
posted by GenderNullPointerException at 8:07 PM on August 6, 2018 [4 favorites]


VS Code's vim plugin will optionally use neovim behind the scenes to give you an Ex mode that actually is vim, not just emulates it.
posted by bcd at 8:09 PM on August 6, 2018 [3 favorites]


I mostly use Intelij with vim mode enabled these days but I can't imagine coding without vi keybindings. It's the way that my fingers think.

Despite being a heavy MacVim user, I just can't use the Vim bindings for other programs like this, for whatever reason. But then I was much less Vimsperienced the last time I tried.

:wq
posted by tobascodagama at 8:21 PM on August 6, 2018


I'm trying to use vim more for the relatively light, easy programming I do. (Okay, mostly I use jupyter notebooks because I'm not great at Python and it's just better to start out by being able to test every line.) I used to use it all the time about a decade ago, and I really, really look forward to getting that ultrafast editing back into my kinesthetic memory. I just...really like vim. It was part of my daily life during some very happy years, and I think it's coming around to that again.

Also I've used Atom from time to time and I swear it's somehow smarmy.
posted by kalimac at 9:09 PM on August 6, 2018 [4 favorites]


There's now an emacs package called evil-mode which implements modal editing and vim-style keybindings. The spacemacs distribution uses evil-mode as the standard keybindings.

something something operating system...?
posted by meaty shoe puppet at 9:26 PM on August 6, 2018 [1 favorite]


If you've been dreading learning vim, I recommend VIM Adventures. It's a game that teaches you the basics. As a long time Windows guy who took a Linux job, it was a godsend.
posted by rouftop at 11:59 PM on August 6, 2018 [4 favorites]


First you hate vi (modes, what?). Then you mearly dislike it. Then you can take it or leave it. Then you start reaching for it. Then it becomes your editor of choice.

In 1999 I was required to use Vim to update HTML on a site (live in production, of course) when I was still very green with Linux. First two weeks, I was utterly bewildered. The next two weeks, I was unhappy and convinced it was a form of hazing.

After about two months I would have beaten someone with my keyboard had they tried to make me use another editor.

Emacs, as the joke goes, is a fine operating system but it lacks a kernel and a decent text editor. I have tried it a number of times, but I only have ten fingers - which is about five short for all the alt-meta-super-ctrl-m type keybindings...

A funny bit of trivia: as I understand it, the first edition of "Linux for Dummies" included a section on vi/Vim, but neglected to include instructions to exit the editor.

Vim is a tool that rewards repeated use and study. I'll be sad when or if it is no longer the default editor for *nix type OSes.
posted by jzb at 12:06 AM on August 7, 2018 [3 favorites]


I use a tablet my daily driver - specifically an iPad Pro with a keyboard - and not having a pointing device makes me very happy to have VIM and VIM-like options.

Fast to start, multiple decent implementations, makes the keyboard a first-class UI citizen.
posted by mce at 12:26 AM on August 7, 2018


I got my start sneaking around Unix systems in the Seattle area with my BBS pals in the late 80s/early 90s. By the time I actually wanted to do any text editing on those systems, the University of Washington's pine mailreader had made the pico text editor widely available, and that was extremely familiar to my DOS background.

But I had had to learn enough of "hit i, then type what you want, then ESC Z Z" to make original vi work, and was given formal instruction in it for a C programming course. I used elvis on my Slackware box, and loved that if you crashed out in the middle of an editing session you'd get e-mail from Elvis telling you how to resume!

I then had a fellow student excitedly show me EMACS, and I was intrigued. I got a little into it, and then tried to log into the class AIX system remotely to do some coding. Okay, let's type some code in, thanks for the auto-indent...ok let's save with ^X^S and... my terminal froze? Killed the session, tried again...same damn thing

You see, Ctrl-S is for terminal flow control. It was a way of pausing terminal output back in the era of paper teleprinters, so you could check what you had a bit before spending any more paper and ink on further results. You resume it with Ctrl-Q and Bob's your uncle, but my terminal software at the time was catching it for emulated hardware flow control and never letting the remote session ever see the magic keystroke!

So instead I just went deeper into vi, and eventually found vim especially once Red Hat made it the default and then Debian made it trivial to grab stripped-down versions of it via vim-tiny or vim-nox (No X Window System support, which just meant character-terminal mode only for a then-significant disk space savings).

I attended a talk at SVLUG where a researcher described inefficient text editor use they'd been studying, including the use of arrow keys to navigate when whole-page operations existed to travel faster. I had always used the home-row arrow keys ever since my younger brother pointed out they were the nethack movement keys, but then I started learning how to move by word (w W b B), sentence (( )), or paragraph ({ }). I found ways of bouncing between matching parens or quotation marks (%) and then learned that the standard operations in vi used them as arguments!

So when I decided to give EMACS a try again (mainly to try out gnus), I kept asking people things like "Okay, but how do I delete the previous three sentences?" and was met with stony confusion. In vi that would just have been d3( but every simple text editing question I asked was met with either "write some ELISP" or "use viper mode if you're so keen on vi!"

But when On Sharpening The Saw came out I suddenly understood exactly what it was about vim that appealed to me, and which bits left me cold. Trying to be an all-singing all-dancing operating environment didn't fit, but optimising the task of editing text was precisely the sort of thing I got out of it.

That essay uses the commentary plugin as its core example, but for me the best example is speeddating. It takes the existing keystrokes for incrementing and decrementing numbers in-place (^X ^A) and makes it aware of types, so that it doesn't assume that 2018-08-07 is an arithmetic expression of one positive number and two negative, but rather an RFC3339 date. It then knows when to go from 28 February to 1 March and when to go to 29 February. It can handle timestamps after it, and knows that milliseconds are decimal while minutes and seconds are base-60.

So I am no longer interested in plugins that try to turn vim into a fully-fledged "IDE" with sidebars and popups and all that. Instead I just want plugins that ask the question "when the user edits text using these commands, how can we make that better?"
posted by rum-soaked space hobo at 12:32 AM on August 7, 2018 [7 favorites]


Also I still reflexively use Unix terminal/EMACS control characters when line-editing (such as at the BASH shell). This means I tend to try ^W to delete the previous word or ^U to delete the entire line before I remember that I'm in a web browser and I've just nuked a whole tab.
posted by rum-soaked space hobo at 12:35 AM on August 7, 2018 [2 favorites]


As a filthy Windows person, I mainly use Notepad++. For the Linux systems at work I have to ssh into, though, it's vim all the way, with the elflord color scheme because a.) c'mon, "elflord", and b.) the default color scheme kept rendering comments in config files as dark blue on black, and my eyes were about to fall out of my head.


...and I just, no word of a lie, tried to submit this comment by doing ESC-colon-w-q. I need a vacation.
posted by Mr. Bad Example at 1:48 AM on August 7, 2018 [1 favorite]


I wonder—is there some deep divide between the <ESC>:wq crowd and us sensible ZZ sorts?
posted by bcd at 2:10 AM on August 7, 2018 [4 favorites]


Lotus Notes closes the document that you're writing when you hit the ESC key, it's maddening.

You must be truly dedicated to the editor if that's what shits you about Lotus Notes.
posted by pompomtom at 2:11 AM on August 7, 2018 [5 favorites]


And thanks to this post I just discovered I can scroll a satisfying post at a time up or down Metafilter with the K and J keys respectively!
posted by eddieddieddie at 2:17 AM on August 7, 2018 [2 favorites]


I started using vi on an AT&T 3b2 in late 84 or early 85.

Actually, I started off using ed. My professor at the time had a theory that we should focus on our programs by limIting line lengths, so we got to focus one line at a time. Halfway through the semester we got to use vi. Our functions had to be less than a screen (24 lines) in length.

Fun times.

I tried emacs for a while but I guess I’m west coast when it comes to editors.
If you want to learn an editor use the keybindings to send and respond to email.
posted by grimjeer at 4:43 AM on August 7, 2018


I like that Vim still exists, and I used Vi on a VAX 11/780 in college but I wouldn't torture myself now.
posted by GallonOfAlan at 4:45 AM on August 7, 2018


Vi is always there, so knowing a few key strokes seems a good thing to know.
I no longer have to use it on any machine to do anything, but it is comforting to be able to edit a text file on any command line ever.
posted by bystander at 4:46 AM on August 7, 2018


Using Vim is the only thing I like about my current job. None of my coworkers have ever heard of it. In retrospect, I'm incredibly lucky that IT approved my request to have it installed as a piece of "non-standard software".
posted by paper chromatographologist at 5:38 AM on August 7, 2018 [2 favorites]


A funny bit of trivia: as I understand it, the first edition of "Linux for Dummies" included a section on vi/Vim, but neglected to include instructions to exit the editor.

Easy peasy, in another window,

ps aux|grep [user id] | grep vi|awk '{print "kill", $2}'|sh
posted by sammyo at 5:41 AM on August 7, 2018 [10 favorites]


So I am no longer interested in plugins that try to turn vim into a fully-fledged "IDE" with sidebars and popups and all that.

100% agreed in principle, but vim-fireplace was really cool for the couple of months I was doing Clojure stuff, though.
posted by tobascodagama at 5:42 AM on August 7, 2018


I'm a manager/sysadmin who learned about real computers with unix (sunOS/solaris) in my engineering labs at uni in the early 90s, and ssh is my 3rd or 4th most used program (real bash on windows is so awesome). By any metric, I should be a die-hard vim or emacs user.

But I hate them both. I've bounced off the initial illogic of vi/vim more times than I care to count, and even now can just about manage to begrudgingly do very minor edits in vim. I mean, an editor designed for use with a smegging line printer instead of a screen and no cursor keys and WTF with the ESC key, as a backstop, fine. But as your preferred option? Why go through all that pain? Why?? I could do multivariable calculus in my sleep and was designing VLSI ICs via text (gooo verilog), but vi, god no, that was too nuts.

I don't remember what I used right at the beginning (probably the OpenWindows text editor) but PICO was my saviour. For *years* I would install PINE just to get PICO. Now, you can bet that every linux system I ever run will have nano in the build, no matter what. Even though I'm using VS Code these days for most things, nano, that simple little editor that saved my sanity will always have a special spot in my heart. Even though I have killed more chrome tabs with ^W when attempting to search than I care to admit.

Guess I'm still just a Gen X slacker.
posted by Absolutely No You-Know-What at 6:04 AM on August 7, 2018 [4 favorites]


jzb: Emacs developers tend to prefer two-finger chords or prefix sequences. The only software I use that demands three-finger chords these days are Microsoft Word and Google Chrome curiously enough.

rum-soaked hobo: `C-{number}` to repeat an emacs command an arbitrary number of times. It's prominently covered in the manual and tutorials. Although in general, I hate both vim-golf and emacs-golf because they force me out of meaning-mode and into bean-counting-mode. Like most humans, I'm better at meaning than bean-counting, so I write functions to count the beans and use search to jump to where I need to change the meaning.

Where I think emacs really shines is the command-line interface with fuzzy completion. If I find myself in desperate need of backward-kill-sentence, `M-x back kill` (using ivy) will suggest it with the keyboard shortcut displayed.
posted by GenderNullPointerException at 6:06 AM on August 7, 2018


Stack Overflow: Helping One Million Developers Exit Vim

(Over 1.6 million now!)
posted by tomcooke at 6:31 AM on August 7, 2018 [7 favorites]


Of course this would turn in to an Emacs thread, Org-mode is probably 60% of the reason I don't just use a big IDE full-time but it's also got the best Haskell support I've found.
posted by Space Coyote at 6:55 AM on August 7, 2018 [1 favorite]


I imagine most readers of this thread will recognize my favorite editor from my name. I guess I just love freedom.

It was an interesting article though.
posted by M-x shell at 7:32 AM on August 7, 2018 [2 favorites]


Vim is too much mess for me, honestly, I've been using Microsoft Visual Basic for 15 years and the other engineers be damned if they can't keep up!
posted by GoblinHoney at 9:43 AM on August 7, 2018


Ah—the heyday of the editor wars, when we could still laugh about EMACS meaning Eight Megabytes And Constantly Swapping

EMACS was the [fake] Unix error code for "Editor too large."
posted by Obscure Reference at 10:51 AM on August 7, 2018


Also I still reflexively use Unix terminal/EMACS control characters when line-editing (such as at the BASH shell).

I stuck with ksh and avoided bash for a long time because ksh allows vi commands when editing shell input.
posted by Obscure Reference at 10:54 AM on August 7, 2018 [1 favorite]


When you run a shell in an emacs buffer you have the entire editor available for input and output.
posted by M-x shell at 10:59 AM on August 7, 2018 [1 favorite]


Eponysterical!
posted by Obscure Reference at 11:04 AM on August 7, 2018 [3 favorites]


When you run a shell in an emacs buffer
posted by M-x shell

I'm going to just leave that one there...
posted by golwengaud at 11:06 AM on August 7, 2018 [2 favorites]


I stuck with ksh and avoided bash for a long time because ksh allows vi commands when editing shell input.

Since at least version 2.0 you could enable vi mode in bash with `set -o vi` .

That being said, ksh — especially ksh93 — is far superior to bash in myriad ways.
posted by thedward at 11:43 AM on August 7, 2018 [3 favorites]


The escape key on the ADM-3A keyboard was also where today we would find the tab key, which explains how such a hard-to-reach key was ever assigned an operation as common as exiting a mode.

A quick-and-dirty solution (mostly dirty) is to remap the escape key to the semicolon key in your .vimrc. This will make you miserable if your programming includes semicolons, and also if you use semicolons frequently in emails and the like.

But if you program in non-semicolon dependent languages, like Python, and are comfortable with using commas and periods instead of semicolons in standard text, this remapping may be your friend. The semicolon sits below the right pinky on QWERTY keyboards, and is always close at hand for mode switching. YMMV.
posted by Gordion Knott at 11:55 AM on August 7, 2018


FTA: Today, according to Stack Overflow’s 2018 Developer Survey, Vim is the most popular text-mode (i.e. terminal emulator) editor, used by 25.8% of all software developers (and 40% of Sysadmin/DevOps people).... The 2018 Stack Overflow Developer Survey suggests that this is true; only 4.1% of respondents used Emacs.

What that tells me is that vim users are 6 times more likely to need to research stuff on Stack Overflow than Emacs users.
posted by hanov3r at 12:04 PM on August 7, 2018 [4 favorites]


On Linux, I first turn CapsLock into a Super keysetxkbmap -option caps:super — and then using xcape, I configure it to act like Escape when it is hit by itself — xcape -e 'Super_L=Escape'.
posted by thedward at 12:18 PM on August 7, 2018


First you hate vi (modes, what?). Then you mearly dislike it. Then you can take it or leave it. Then you start reaching for it. Then it becomes your editor of choice. You switch your email client to use vi to compose email.
I dunno, I've been doing stuff in *nix environments for nearly 20 years and I still hate vim with the burning passion of a thousand suns. Hate it. Instant rage whenever I find myself forced to use it. I salute all you people who have managed to make peace with the constant stupid mode switching... it still makes me want to throw my machine out the window.
posted by Funeral march of an old jawbone at 12:26 PM on August 7, 2018 [2 favorites]


There's an argument to be made that Vi is not a modal editor.

There aren't modes, just commands. The insert and append commands accept as many arguments as you care to type, and terminate at the ESC key. Other commands have a fixed number of arguments and terminate when they're syntactically complete (e.g. d$ to delete to the end of the line).
posted by alpheus at 12:37 PM on August 7, 2018 [3 favorites]


The author of Mastering Vim Quickly at least has a sense of humour about adopting Vim.

I try to install Micro on every system I have access to (sometimes difficult, as it's written in Go) as it's the almost perfect little editor.
posted by scruss at 5:37 PM on August 7, 2018 [2 favorites]


I love that OSX has Emacs cursor commands pretty much everywhere. Is there another OS that does this? It's one of the things that has kept me faithful to the Mac all these years.

...as pathetic as that is...
posted by bshort at 6:10 PM on August 7, 2018


FYI, When I moved from Linux to Mac OS X, I missed xcape, but found Karabiner (now Karabiner Elements) which lets you do the same sort of remapping of Capslock to Esc & Ctrl depending on chording or not.
posted by gryftir at 7:39 PM on August 7, 2018


I remember the first time I encountered vi, even if I didn't realise it at the time. I was sat in the server room at my summer placement after my 1st year of Comp Sci degree, being told things like "press i, now type something-or-other, now press Esc". It was only years later that I realised I'd been in a text editor rather than using some obscure app they'd written.

These days it's become my text-editor-of-choice, even to the level that vim is credited in the "production notes" section of my book, because that's what my co-author and I both used to write it.
posted by amcewen at 5:06 AM on August 8, 2018


GenderNullPointerException: that's all well and good, but apparently I'd have had to teach EMACS what a "sentence" was in the first place. And then how do I copy that range instead of delete, or perform some other operation on it? The answer everyone gave me involved a lot of "mark" and "point" nonsense that would have taken forever compared to just three keystrokes.
posted by rum-soaked space hobo at 12:19 AM on August 9, 2018


I learned vim 7 years ago, when I got my current job. Before that, I'd always programmed on Windows machines, so I'd use notepad++ or Visual Studio. But now I was on Linux, so I had to learn a new editor. A bunch of folks on my team used emacs and only a few used vim. I can't remember exactly why I chose vim, but I stuck with it, even though it felt for a long time like I was making no progress at proficiency.

I don't think I ever had a moment where it "clicked", instead I just found certain commands that were useful and started incorporating them into my everyday use (a few of my favorites are Ctrl-a and Ctrl-x to increment and decrement values). Sometimes I'll see someone use a command I've never seen before, or in a way that I didn't think of, and I get a rush of excitement -- how did you do that!? -- like watching a magic trick.

The reverse happens too: I'll see someone using Visual Studio Code or sublime now and watch as they try to perform some text-editing task, usually just giving up to do it manually. I can't help but think about how I'd do the same thing in vim, and it would be so easy ... and efficient! Maybe that's part of the appeal of vim for some programmers; that it turns text editing into a puzzle to be solved.
posted by binji at 2:15 AM on August 9, 2018 [1 favorite]


that's all well and good, but apparently I'd have had to teach EMACS what a "sentence" was in the first place.


A sentence is marked by period, question mark, or exclamation mark followed by two spaces, as explained in the emacs manual page on sentences.

And then how do I copy that range instead of delete, or perform some other operation on it?

`C-k` for copy, which is the default operation.

The answer everyone gave me involved a lot of "mark" and "point" nonsense that would have taken forever compared to just three keystrokes.

This is a weird complaint given that one of the key features of vim is its mark and point mode. In both vim and emacs it's three operations. In vim you would do `v/{word}d` and in emacs it's `C-space C-s{word} C-k`. (There's also avy-jump if you want quicker jumping.) In fact, "kill the next three sentences" is a shorter operation in emacs than in vim. "C-3 M-k". The hard part is that you have to remember both the move and kill variations.
posted by GenderNullPointerException at 4:52 AM on August 9, 2018


My mistake, it's M-k for copy.

Although to be honest, in both vim and emacs I default to search and cursor keys with visual selection because "what do they really mean" is much more important than improving my keyboard golf score.
posted by GenderNullPointerException at 5:39 AM on August 9, 2018 [1 favorite]


Along those lines, what really opened up vim for me was getting over my gut feeling that "visual mode" was somehow doing things wrong. But you get a lot more comfortable with the complex motions when you can see the result before taking any actions.
posted by tobascodagama at 7:47 AM on August 9, 2018 [1 favorite]


« Older "A. Imagine Trump's library." "B. You'd have to."   |   “Nobody has ever made head or tail of ancient... Newer »


This thread has been archived and is closed to new comments