37

I was extremely impressed with the power of vi from the first half hour that I used it. I then found out that in some work environments, there are many people (technicians, and even system administrators!) who avoid it as "too complicated" without ever having run the vimtutor, and still other people who use vi only in insert mode and miss the whole point of modal editing.

How can I demonstrate the power of vi/Vim to others in such a way as to inspire them to learn it and use it?

I am especially interested in any actual histories of what has been successful in getting others (or yourself) to learn and use Vim.

  • 4
    I read the guidelines on subjective questions and I think this fits. – Wildcard Oct 8 '15 at 5:32
  • @Wildcard perhaps it does fit on subjective questions, but it really is too broad. See meta.vi.stackexchange.com/q/1278/205 for discussion we had on a similarly "subjective" question. – muru Oct 9 '15 at 0:42
  • I see your point. I read through that discussion (and several linked discussions). I still think this question is appropriate, but I don't think I'm supposed to discuss that here; is there a place in meta where we should discuss it? – Wildcard Oct 9 '15 at 1:38
  • @Wildcard you can always post a question on Vi and Vim Meta about this question. – muru Oct 10 '15 at 19:19
  • 1
    @Rich Here is an example of such a Medium post: Why I love Vim: It’s the lesser-known features that make it so amazing. – Serge Stroobandt Sep 26 '18 at 22:55

14 Answers 14

55

Although I've invested some effort in Vim and its ecosystem I don't actively try to convert others. Most of the people I've worked with don't invest much time at all into improving their workflow and toolset because they are satisfied with what they have. I find that perfectly fine… and I would hate to be the target of constant editor-related proselytizing so I don't impose that to others.

Sometimes, though, a coworker might be intrigued by my vimming and ask me a couple of questions. When that rare event happens, I'm more than happy to discuss the subject, demo cool tricks, and point him/her at useful resources.

At my last job, a coworker was very interested by Vim and knew the basics quite well (vimtutor). It was enough for him to be able to perform quick edits but he lacked the confidence and the know-how to actually switch to Vim (something he actually wanted). At one point, he had to do a series of repetitive edits on a large JSON file manually. He was distressed by the idea of wasting an hour doing that and came to me looking for a faster/smarter solution. Of course, a simple macro did the job in less than a minute (including recording) which allowed me to explain a few key concepts…

One problem faced by newcomers is that "Now what?" moment that comes just after vimtutor. Vim hides its beauty very well and not many people have the will to crack that shell without help. I can provide that help if needed… but I will never force Vim unto others.

20

I use Vim for everything. I mean everything. Programming, word processing, writing novels, etc. Everything. I have been sitting at an auto dealership using a Surface Pro 3 running a Linux Virtual Box with Vim and had people strike up conversations with me about what I am doing.

Just use Vim. People will flock to you to find out what it is you are doing and why. I usually explain it this way -

I use Vim because it has a very small footprint. Microsoft Word is several gigabytes and my Surface only has 128 GB of space. I need to maximize my space and Vim helps me do that. It is also extensible and helps me stay focused. Here, look. Demo some of my plugins and show how Vim in full screen essentially covers everything up so I can think.

I often demonstrate LaTeX in combination with Vim. I will build a LaTeX file and then compile it into a beautiful PDF using a template I have. I also demo my letter and resume templates. I stress how important it is to break up style from content. By this point people are no longer interested in what I have to say and regret speaking to me.

They look for a way out of the conversation, and I go back to writing. Vim is a religious experience more than a word processor.

  • 3
    Just wondering: do you write your email in vim as well? (I do!) – Oliphaunt Oct 8 '15 at 17:57
  • 5
    @Oliphaunt I do write emails in VIM. My email client of choice is MUTT and when I edit or create a new email, it opens my editor of choice. I even use VIM for adding URLS to my RSS feed reader (newsbeuter). – ILikeTurtles Oct 8 '15 at 19:12
  • 7
    Some folks decided to edit my answer by stating I use Visual Basic. I use Virtual Box and run Linux over top of Windows. However, I think these edits are super interesting so I will just leave it. It's kind of like playing telephone with edits. The story just keeps changing the more people edit it. Fun. – ILikeTurtles Oct 12 '15 at 16:46
  • 2
    @Will Yep. I have a VM that takes up something like 2 GB or less. I would rather install an entire operating system, VIM, and all of my other tools than install a 4GB or whatever copy of Microsoft Tools. The VM itself can expand if I need it to, but that hasn't happened yet since I work mostly with text files when dealing with that particular computer. If I was using FreeBSD, I could potentially run an even smaller footprint and probably run the whole VM in under a gig. – ILikeTurtles Oct 21 '15 at 16:47
  • 3
    Office 365 Requires UP TO 6GB of hard drive space and UP TO 4GB of ram. I can run an entire linux OS using 4GB of HD space and 1028MB of ram. Less if I want to push things. I have run FREEBSD in a VM and only gave it 256MB of ram. VIM for me replaces Office but in addition, a full OS install gives me many more tools than Office provides in less foot print. I hope that makes sense. – ILikeTurtles Oct 21 '15 at 16:54
17

Demonstrate the power of dot ('.') in command mode. Easily repeating a complicated edit with one key press generally looks like magic.

13

As someone that had to learn Vim at my last job, I would say that the biggest hurdle was being put in front of a "default" install that had no options set. I spent most of the time saying, "Why does it act this way when everyone would expect it to do the opposite?"

It turns out that every one else already set some "sanity" defaults. Once I figured that out, I was much happier, and "gave it a chance" to learn more. After a few days of the number pad not working, tabs being wrong, searches not working well, etc. I was ready to throw in the towel and never look back.

If you really want someone to like it enough to try and learn more advanced features, start them off on the right foot with a settings file that is optimized for the type of work they need to do.

  • 4
    See, I approached it with none of these pesky expectations you mentioned. This was aided by the awareness that it was born decades before the products general users are familiar with nowadays. I'm open to better ways of working, whether or not they're familiar. And really, saddling a newbie with your own settings file is not a very good tutorial! – underscore_d Oct 10 '15 at 14:28
  • +1. I had the same experience and couldn't agree more. When you have work to complete, switching to any new editor can be painful/impossible. Don't know about just handing over a .vimrc but explaining what it is and helping a new user set a few defaults for their style of working can not only help them be productive quickly but also serves as a way start to expose part of vi(m)'s magic. – Will Oct 21 '15 at 16:11
  • 1
    Reading a .vimrc file with a bunch of helpful defaults is really useful. I've learnt a lot about Vim just by looking at the options set in github.com/amix/vimrc – icc97 Mar 31 '17 at 7:58
  • I completely agree. Vim would be even more popular if some more batteries were included. Look for example at what I had to do to make word swapping work. As it currently stands, vim delivers the basic building blocks from which one has to configure/program the text editor one always dreamt of. – Serge Stroobandt Sep 25 '18 at 21:23
9

The best way to inspire an old dog to use a new trick is to take something they are doing and show how it can be easily done faster/easier/better in another way.

There is definitely a learning curve involved though which just turns some people off. One joke goes

How do you truly generate a random string? Ask a newcomer to close vim.

  • 1
    Good point. As someone who has a tendency to be keyboard-oriented rather than mouse, vi/m in many situations offers me a speed boost and/or avoids flipping between input devices. Also, I do quite a bit of command-prompt stuff (Linux, Cygwin), and vi is always just there. – underscore_d Oct 10 '15 at 14:30
8

The best way is to learn Vim your-self and demonstrate the power of it to others. Even you don't have to (demonstrate it) - it's self-promoting. Once you're using it with some fancy syntax colors on some hackish-like terminal background, people gets curious and often ask - what the heck are you doing. Then show to them.

When you do pair programming and you see that another developer started doing some repeatable work which feels like a Sisyphean task (like hitting the Backspace or arrows hundreds of time), tell him how much this annoys you as in Vim it takes only few keystrokes in less than a second.

Also check the following pages for some useful Vim tricks:

  • 1
    Your second paragraph is spot-on. Except the pain is even worse when you see them using vim, in insert mode, and pressing the arrow keys to move right to the end of the line. Arrrggh! (I'm not making this up.) – Wildcard Oct 9 '15 at 13:15
  • 1
    Concur with @Wildcard, drove me crazy watching my colleague trying to parse fixed-width data by counting keypresses, took him a couple of weeks, my help was declined. Sigh – roblogic Feb 9 '16 at 1:15
7

Most importantly: don't push, don't evangelize. Be absolutely sure about your motivation. If there is even a hint of missionary work, don't start. The overwhelming majority of people react either annoyed or aggressive, because the mere suggestion to check out another workflow carries an undercurrent of criticism. That your workflow may be better than theirs. Which closes many people off. Actually, this is a general principle that works regardless of setting (think Vegetarians/Meat eaters, Democrats/Republicans, car brands, recipes, …) They all do what they do because they believe what they do is the right way to do it.

It may very well be that no criticism from your side is intended in the first place, but this happens on the other side and there's nothing you can do about it. That's humans for you.

I suggest bringing the subject up when there is no deadline, in a relaxed setting. Talk from your experience, in a way how impressed you were and how much more efficient you feel now. Never compare. Never say "it's better", as that would be an absolute statement, just asking to be challenged. Always go with "I'm more productive this way". This way the other person cannot dismiss that you may indeed be more productive and you don't apply any pressure. If the other picks the topic up, be gentle and maybe offer to share a link or two, Vimcasts is a great resource for example.

Learning Vim is a hell of a task, especially considering the insane amount of time you invest to get your very first setup right. I had so many question marks in my head during that time and about every second setting seemed nonsensical or even hostile. It's the opposite of intuitive. Either someone sticks with it and gets progressively more "aha!" moments or will just drop it for a more Word-like editor. Whatever works.

In the end it's really not worth any debate: everybody just uses what gets the job done. That's the beauty of source code: it's universal.

7

The first time I used vi was in an "intro to Unix" class. The teacher didn't know it very well, and he introduced it in a very clunky way. We had to memorize enough to get around if we ever got stuck in a system that didn't have anything else installed. I didn't take a second look after that semester. That's how you don't evangelize vi, and I think is how a lot of people had their first experience.

A few years later, I was in a corporate continuing education class about Perl. The instructor used vim in his demonstrations and offered to help people with it on the side, even though it wasn't the primary purpose of the class.

An unofficial motto of Perl is TMTOWTDI (there's more than one way to do it). As the class would ask questions, the instructor would make edits to show alternatives, faster than he could describe the edits in words. I was accustomed to being able to read code as it was being edited, but for him, editing happened in a flurry of keys, then the explanation followed, at glacial speed in comparison. If he didn't have to stop to explain the edit to us, he would have already moved on to the next task.

I have a fair few similar opportunities to demonstrate vim:

  • Scrum meetings
  • Pair programming
  • Tech talks
  • Software demonstrations

I think just showing people its potential after you learn it will inspire them to push past the initial clunkiness.

  • I think that your comparison of the impressions created by the two very different exposures to vi is a very valuable lesson. I've thought of this many times since reading it...sticks in my mind. Thank you. – Wildcard Dec 2 '15 at 6:36
6

It was the inner motions that made my eyes turn into floating hearts for Vim. In addition to . repeats and prefixing stuff with counts, showing inner motions is usually one of the first things I show/share when someone asks me about vim. ci( or gUi> or diw.

g; and g, to jump around to the places you've edited is usually good for an eye widening or two.

2

Although vi has a respected pedigree in computing history, I would recommend focusing on vim. It is a full featured editor with incredible capabilities, matching any of its competitors. Its only drawback is the learning curve; it does take time to get the "Vim mindset" and muscle memory. I think it is well worth the effort. There is a lot of power at your disposal when you become proficient at vim.

  1. Demonstrate the power of vimscript to automate boring text processing tasks.
  2. Install cool plugins like vim-airline, because everybody likes a good UI.
  3. There are loads of free tutorials around, like this one.
  4. vi/vim is installed on all Unix-based systems; so any professional sysdamin should have a working knowledge of it.
  • The real crux of my question is "How" regarding point 1 of your answer. Have you had any experiences showing this to others or being shown yourself? – Wildcard Oct 8 '15 at 6:58
  • Not so much demonstrating, but I use small vim scripts routinely to clean up text, but like you I haven't much interest from colleagues (they prefer to dump output into massive documents that nobody reads) – roblogic Oct 8 '15 at 7:24
0

I love VIM, but the learning curve is steep.

Any professional who hasn't adopted VIM yet is unlikely to be persuaged by argument. Only by necessity.

Listening to people who say they use VIM on a regular basis, the largest use case are from admins managing multiple *NIX machines remotely with CLI via SSH.

VIM is literally installed on nearly every *NIX machine on the planet.

VIM is 25+ years old and unchanged since I started using it in 1998.

0

Simply ask the pupil to swap two words with their Word™ processor…

…then show how the master does this with vim. (Here is the mapping to do so; more here.)

Finally, let the pupil contemplate whether he/she truly has been working with a word processor so far.

  • 1
    Clever, but control-backspace will delete a word in pretty much any Windows editor, and alt-backspace will in pretty much any Mac editor. – Wildcard Sep 25 '18 at 19:04
  • @Wildcard I was doubting between delete and my first idea select. You are absolutely right, of course. Therefore, I changed it back to select. – Serge Stroobandt Sep 25 '18 at 19:11
  • Still—ctrl-shift left/right arrows (or alt-shift arrows for Mac). :) – Wildcard Sep 25 '18 at 19:35
  • @Wildcard I think I got it now. I had to reconstruct my past reasoning. ;) – Serge Stroobandt Sep 25 '18 at 20:27
  • @Wildcard Thanks for insisting. I had a hard time recalling what exactly caused me to make the drastic change to gvim. Now, I remember well. It was swapping/moving words in a sentence when writing an English text as a nonnative speaker. I wrote my own vimscript mappings for doing exactly that. – Serge Stroobandt Sep 25 '18 at 20:58
0

Vim is also about revaluing plain text files

In the context of document creation, the value of vim is not only in its fabulous word editing skills. Vim is also a path to reinstating the value of the ubiquitous plain text file and its guarantee of timeless backwards compatibility.

Vim is also about focusing exclusively on content; not format

If one is not into web page editing, the separation of content from format might be a paradigm shattering concept to any regular office worker. For this reason, I like to show off gvim as a Markdown editor in combination with Pandoc and perhaps a makefile.

This happens also to be a good demonstration of the Unix or GNU/Linux philosophy of combining and piping programs that are extremely good at just one thing.

As a bonus, you will see that the basic vim key combinations are used throughout many other GNU/Linux programs.

0

Ergonomics

With the right setup I can work for hours without getting any shoulder or back pains.

The right setup is of course different for everyone, but using Vim in a terminal, mapping Esc to Capslock and disabling the mouse and the cursor keys is a good start.

protected by Martin Tournoij Mar 11 '17 at 18:57

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.