<p>A good while ago, I read <a href="http://www.viemu.com/a-why-vi-vim.html" rel="noreferrer">an article by the creator of viemu</a>, clearing up a lot of the misconceptions about vi, as well as explaining why it's a good idea (and why it's been very popular for the last 30 years+). The same guy also has <a href="http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html" rel="noreferrer">a great set of graphical cheat sheets</a> that teach the basics a few bits at a time.</p>
<p>I'm convinced.</p>
<p>I've been convinced for the past 2 years in fact. But I still really haven't gotten around to force myself to learn vi as my primary editor, the learning curve is just too high. When I get down to work, acceptable but immediate productivity (using my current editor) has so far won over tremendous productivity farther down the line (using vi).</p>
<p>Does anybody have any good tips to help get past the learning curve? It can be straight out tips, some other tutorial or article, whatever.</p>
<p>Edit: Note that I'm aware of the <a href="http://www.vim.org/" rel="noreferrer">vim/gVim</a>, <a href="http://cream.sourceforge.net/" rel="noreferrer">Cream</a> and <a href="http://code.google.com/p/macvim/" rel="noreferrer">MacVim</a> (etc.) variants of vi. I kept my question about vi to refer to the vi family as a whole. Thanks for all the great answers.</p>
<h3>Update (April 2009)</h3>
<p>I've been using Vim (more precisely, MacVim) in my day to day professional life since last December. I'm not going back :-)</p>
<p>Good luck to everyone in their Vim mastery.</p>

[{'answer_id': 74635, 'author': 'Bob Dizzle', 'author_id': 9581, 'author_profile': 'https://Stackoverflow.com/users/9581', 'pm_score': 3, 'selected': False, 'text': '<p>delete all other text editor apps.</p>\n\n<p>Then you will have to learn it.</p>\n'}, {'answer_id': 74651, 'author': 'Dana', 'author_id': 7856, 'author_profile': 'https://Stackoverflow.com/users/7856', 'pm_score': 3, 'selected': False, 'text': '<p>The simplest way to <em>force</em> yourself might be just to remove all the other editors from your machine.  Get rid of temptation :)</p>\n'}, {'answer_id': 74659, 'author': 'shyam', 'author_id': 7616, 'author_profile': 'https://Stackoverflow.com/users/7616', 'pm_score': 0, 'selected': False, 'text': '<p>delete notepad.exe and create a shortcut to vim called notepad instead :)</p>\n\n<p>or do all your coding via ssh or on a machine that has no GUI ;)</p>\n'}, {'answer_id': 74660, 'author': 'Bob Wintemberg', 'author_id': 12999, 'author_profile': 'https://Stackoverflow.com/users/12999', 'pm_score': 0, 'selected': False, 'text': "<p>I've tried keeping a small cheat sheet or sticky notes of common vi commands.  I do the same thing for an IDE I use.  I find if I put sticky notes of keyboard shortcuts or commands on my monitor(s) it helps me learn them.  Once I've used the shortcut enough and think I remember it well, I'll remove the sticky note.</p>\n"}, {'answer_id': 74664, 'author': 'Aaron Jensen', 'author_id': 11229, 'author_profile': 'https://Stackoverflow.com/users/11229', 'pm_score': 6, 'selected': False, 'text': '<p>The first thing I\'d do is lay a piece of paper or a book over your arrow keys and your ins/home/end/pgup/down keys. Those aren\'t needed in Vi. </p>\n\n<p>Next I\'d get used to hitting ctrl+[ whenever you\'re told to hit escape. It\'s much faster and you won\'t need to take your hands off the keyboard.</p>\n\n<p>Then I\'d watch my screencasts:</p>\n\n<p><a href="http://www.youtube.com/watch?v=FcpQ7koECgk" rel="noreferrer">http://www.youtube.com/watch?v=FcpQ7koECgk</a></p>\n\n<p><a href="http://www.youtube.com/watch?v=c6WCm6z5msk" rel="noreferrer">http://www.youtube.com/watch?v=c6WCm6z5msk</a></p>\n\n<p><a href="http://www.youtube.com/watch?v=BPDoI7gflxM" rel="noreferrer">http://www.youtube.com/watch?v=BPDoI7gflxM</a></p>\n\n<p><a href="http://www.youtube.com/watch?v=J1_CfIb-3X4" rel="noreferrer">http://www.youtube.com/watch?v=J1_CfIb-3X4</a></p>\n\n<p>Then, just practice practice practice.</p>\n\n<p><em>edit</em>\nThe reason for avoiding the arrow keys is that they slow you down. One of the largest benefits of Vim is the speed it allows you. The arrow keys also prevent you from really embracing the modal nature, which is very powerful when mastered.</p>\n'}, {'answer_id': 74667, 'author': 'Guy', 'author_id': 1463, 'author_profile': 'https://Stackoverflow.com/users/1463', 'pm_score': 2, 'selected': False, 'text': "<p>Write down all the short-cuts and features that you use in your current editor while you're using it at work. Then sit down on Saturday morning and using Google and stack overflow find out how to do each one of those in vi. Probably best if you use a sheet (or sheets) of paper for this.</p>\n\n<p>Now disable/delete the other editors at work so that it'll take you longer to find and re-install them than look at your comparison sheet and do it in vi - i.e. you have no choice.</p>\n\n<p>Lastly, publish your list of crossover shortcuts from your old editor to your new one on your blog.</p>\n\n<p>Good luck!</p>\n"}, {'answer_id': 74672, 'author': 'Lucas Oman', 'author_id': 6726, 'author_profile': 'https://Stackoverflow.com/users/6726', 'pm_score': 8, 'selected': True, 'text': "<p>First of all, you may want to pick up Vim; it has a vastly superior feature set along with everything vi has.</p>\n\n<p>That said, it takes discipline to learn. If you have a job and can't afford the productivity hit (without getting fired), I'd suggest taking on a weekend project for the sole purpose of learning the editor. Keep its documentation open as you work, and be disciplined enough not to chicken out. As you learn more, become efficient and start relying on muscle memory, it won't be as hard to stick with it.</p>\n\n<p>I've been using Vim for so long that I don't even think about what keys to press to search or navigate or save. And my hands never leave the keyboard. To use Vim is one of the best choices I've made in my programming career.</p>\n"}, {'answer_id': 74692, 'author': 'Craig H', 'author_id': 2328, 'author_profile': 'https://Stackoverflow.com/users/2328', 'pm_score': 0, 'selected': False, 'text': "<p>umm, the is more of a physcology question than a programming question, but the best way I have been able to do things that I really didn't want to do is to just do it, and stop trying to thing of ways to motivate myself to do it.</p>\n\n<p>Just think of it as brushing your teeth.  Do you have to motivate yourself to do it?  No, you just do it.</p>\n"}, {'answer_id': 74709, 'author': 'TM.', 'author_id': 12983, 'author_profile': 'https://Stackoverflow.com/users/12983', 'pm_score': 2, 'selected': False, 'text': "<p>My recommendation is to come up with some simple programs and write them, start to finish, using VI.</p>\n\n<p>Odds are, you will be too frustrated at first by the learning curve to force yourself to use them at work or in any time-sensitive environment.</p>\n\n<p>I've done this before to get familiar with environments/editors, and it works pretty well. </p>\n\n<p>If you are having problems coming up with things to write, I recommend redoing projects you did in school (or anything else that you've done previously).  This method has the added bonus of letting you see how much of a better developer you have become. :)</p>\n\n<p>Edit:  forgot to mention that you should do this entirely from the console to avoid any temptation to use the mouse!</p>\n"}, {'answer_id': 74714, 'author': 'Matt Hucke', 'author_id': 2554901, 'author_profile': 'https://Stackoverflow.com/users/2554901', 'pm_score': 0, 'selected': False, 'text': "<p>Spend ten years posting to Usenet from a machine where only vi and emacs were available (and where emacs had an annoying long startup time when invoked from 'rn').</p>\n\n<p>That's how I learned it.</p>\n\n<p>But for a quicker approach, all I can recommend is that you just commit yourself to learning it, and spend a few hours working on some source code.   Install vim if you don't have it already - it has wonderful syntax highlighting features.</p>\n\n<p>It's well worth it.  I know that I can go to just about any Unix machine, anywhere in the western world, perhaps even through a slow dialup connection or on a GUI-less machine, and be fully productive within minutes.</p>\n"}, {'answer_id': 74726, 'author': 'Cristian Ciupitu', 'author_id': 12892, 'author_profile': 'https://Stackoverflow.com/users/12892', 'pm_score': 4, 'selected': False, 'text': '<p>You should start with <strong><a href="http://www.vim.org/" rel="noreferrer">vim</a></strong> (Vi IMproved) and especially its GUI - <strong>gVim</strong>. The GUI has menus and on Windows you can use the copy, cut and paste shortcuts, so you can replace Notepad immediately. And since the menus display the shortcuts (vim commands) you could learn a lot.</p>\n\n<p>Another thing that you should do from the beginning is to configure vi for your needs. For example, you can transform vim into a <a href="http://sontek.net/turning-vim-into-a-modern-python-ide" rel="noreferrer">Python IDE</a>. By doing this, you\'ll have no excuse for using another editor, because vi will offer you everything you need.</p>\n'}, {'answer_id': 74730, 'author': 'Jon Ericson', 'author_id': 1438, 'author_profile': 'https://Stackoverflow.com/users/1438', 'pm_score': 2, 'selected': False, 'text': "<p>Don't use <strong>X11</strong>?</p>\n\n<pre><code>$ sudu rm /usr/local/bin/emacs\n</code></pre>\n\n<p>Change your login shell to <strong>vi</strong>?</p>\n\n<p>First, force yourself to use <strong>ed</strong>, then <strong>vi</strong> will seem like a luxury?</p>\n\n<p>Use the <strong>vi</strong> key bindings in <strong>bash</strong>?</p>\n\n<p>Just start using <strong>vi</strong> all the time?</p>\n\n<p>It seems to me that learning an editor isn't terribly different from learning a language.  Immersion works best.</p>\n\n<p>I use <strong>vi</strong> for really quick edits or when I can't use <strong>X11</strong> for some reason, but I live in <strong>emacs</strong>.  Really powerful editors are worth taking the time to learn.</p>\n"}, {'answer_id': 74733, 'author': 'Bill K', 'author_id': 12943, 'author_profile': 'https://Stackoverflow.com/users/12943', 'pm_score': 4, 'selected': False, 'text': '<p>For me VI is a good emergency editor, but not something I want to use if there is any other alternative available.  I realize this is not for everyone though, I\'m not saying it\'s horrid or anything, I just personally prefer a discoverable UI.</p>\n\n<p>But you really have to know VI if you do anything significant in Linux!</p>\n\n<p>So just learn the basics:\ni=insert mode\nesc=leave insert mode\n:wq=save and quit\n:q!=don\'t save and quit\nx=when not in insert mode, delete the character.\n/=search</p>\n\n<p>That will get you through any editing emergency.  There is nothing you can\'t do with those few commands (and navigation of course).  The rest you can "Tack on" as you need them.</p>\n\n<p>Keep a reference or book available though--when you NEED to use VI, you probably won\'t be able to browse the web--but the man page may be somewhat useful.</p>\n'}, {'answer_id': 74784, 'author': 'Garth Gilmour', 'author_id': 2635682, 'author_profile': 'https://Stackoverflow.com/users/2635682', 'pm_score': 2, 'selected': False, 'text': '<p>You could get your hands on one of the original Happy Hacker keyboards (no arrow keys) and place your (wireless) mouse out of reach each time you start editing.</p>\n'}, {'answer_id': 74798, 'author': 'Craig Hyatt', 'author_id': 5808, 'author_profile': 'https://Stackoverflow.com/users/5808', 'pm_score': 2, 'selected': False, 'text': "<p>It's easy to write out a big list of commands/shortcuts, but it's difficult to remember them all without practice.</p>\n\n<p>Focus on one new command at a time.  When it becomes automatic, say after using it for a week or two, add another to your repertoire.  </p>\n\n<p>You'll be taking the long way around to accomplish certain things in the short term - these are obvious opportunities for new shortcuts to learn.</p>\n\n<p>In my experience it was easier when I tried not to take on too much at once.</p>\n"}, {'answer_id': 74812, 'author': 'Andrew Harmel-Law', 'author_id': 2455, 'author_profile': 'https://Stackoverflow.com/users/2455', 'pm_score': 0, 'selected': False, 'text': "<p>Wait until you have to debug a wierd and wondeful problem in a live environment where all you can do is get to the command line.  You might not end up liking VI, but it will save you a lot of time and you'll learn loads of tricks to step through massive (log) files.</p>\n"}, {'answer_id': 74816, 'author': 'Michael Cramer', 'author_id': 1496728, 'author_profile': 'https://Stackoverflow.com/users/1496728', 'pm_score': 2, 'selected': False, 'text': '<p>My number one suggestion: learn to type fast, without needing to look at the keyboard.</p>\n\n<p>If you can\'t touch type and are always hunting-and-pecking for the colon or the hjkl or :%s/foo/bar, forget about it. Typing <em>can</em> be faster than using the mouse, but if that\'s not the case for you, vi\'s not going to work.</p>\n\n<p>But combine good typing skills, ssh and <a href="http://en.wikipedia.org/wiki/GNU_Screen" rel="nofollow noreferrer">screen</a> and vi will be natural.</p>\n'}, {'answer_id': 74842, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Print out one of the many Vi/Vim cheat sheets you can find on the internet and force yourself to stick with it for a few weeks.</p>\n\n<p>Once you learn some basic commands you can be pretty efficient. From there, just keep plugging away and learn a new command every once in a while. There is no way you can learn ALL the vi commands. I believe there are more vi commands than there are atoms in the universe!! :)</p>\n'}, {'answer_id': 74895, 'author': 'chiggsy', 'author_id': 13202, 'author_profile': 'https://Stackoverflow.com/users/13202', 'pm_score': 0, 'selected': False, 'text': '<p>The best way? Set your terminal to use vi keybindings.  </p>\n'}, {'answer_id': 74967, 'author': 'Matt Price', 'author_id': 852, 'author_profile': 'https://Stackoverflow.com/users/852', 'pm_score': 2, 'selected': False, 'text': '<p>Face the fact that it will create an immediate performance hit. When learning a new tool you need to be able to do something that you know how to do with other tools so the problem isn\'t your problem. After using the new tool a while it will disappear and you will be only focusing on the underlying problem. </p>\n\n<p>With something like vim (as others have said, vim is vastly superior to vi) it is important to reread and browse the documentation periodically. The interface is completely undiscoverable without it. With each new reading you will see a feature and say, "ah ha, that would have solved this issue I was trying to figure out last week", and will file it away in your brain. Solutions connected to real-world problems that you\'ve had are much easier for you to remember than random shortcuts. </p>\n\n<p>In the end you can use vim with a fairly small subset of it\'s features, so don\'t be overwhelmed with all the bells and whistles. Think of all the features in Word, do 99% of the people use them?</p>\n'}, {'answer_id': 74996, 'author': 'David Laing', 'author_id': 13238, 'author_profile': 'https://Stackoverflow.com/users/13238', 'pm_score': 2, 'selected': False, 'text': '<p>gVIM has a really good tutorial (link in the Start menu group).</p>\n\n<p>I found working through that helped to get over the initial learning hump; and then switching my Visual Studio to ViEMU helped me hone my VI skills.</p>\n\n<p>Also, the screencasts at <a href="http://vimcasts.org/" rel="nofollow noreferrer">http://vimcasts.org/</a> are great!</p>\n'}, {'answer_id': 75010, 'author': 'TMarshall', 'author_id': 8847, 'author_profile': 'https://Stackoverflow.com/users/8847', 'pm_score': 4, 'selected': False, 'text': "<p>You asked for good tips to help get past the learning curve on the vi text editor. Many of the previous answers suggest you use no other editors. I think that is good advice.  Switching to vi from a more graphical editor requires a change in mindset. It requires thinking in terms of commands, rather than visual changes.</p>\n\n<p>I used nothing but vi for many years and believe the only way you can be productive is to memorize the commands you regularly use. The way I did this was to make a short list of the most common keyboard commands. I grouped and color-coded these commands by function, i.e. <em>Moving the Cursor, Editing, Searching</em>, etc.  I was careful to only include the most commonly used commands I did not know. The idea is to create a quick reference that is also an aid in memorization – not to replace the available help screens.  Then I printed this list and taped it to the wall behind my monitor so I could see it easily.  (The graphical cheat sheets you mentioned might work better for some, but are probably a better reference source than a memorization tool.)</p>\n\n<p><strong>Here's the key.</strong>  As I became comfortable with one of the commands, I drew a line through it with a pencil.  I could still see it if I needed it, but it was symbolic to me that I had mastered that command.  That gave me confidence and motivation as I could see regular progress.  Once I had most of them crossed off, I removed them and added some of the more rarely used commands.  I continued this process until I was satisfied with my command of vi.  I knew I had reached that point when I realized I had not crossed off any commands or even looked at the list in a long time.</p>\n\n<p>A couple years ago I had need to work on a UNIX platform where vi was the only editor available.  I bought a little pocket reference book on vi, but hardly used it.  I ended up making lists and posting them on the wall as I did the first time I used vi.  By the end of the first week, I was very comfortable even though it had been five years since I had used vi.</p>\n"}, {'answer_id': 75012, 'author': 'Nathan Fellman', 'author_id': 1084, 'author_profile': 'https://Stackoverflow.com/users/1084', 'pm_score': 0, 'selected': False, 'text': "<p>I only learned vi when I started working for an ISP where the scripts for editing domains only opened vi on a terminal.  I had no choice but to learn it, but I've never regretted it.</p>\n\n<p>In short, put yourself in a situation where you have no choice but to learn it.</p>\n"}, {'answer_id': 75074, 'author': 'Phillip Wells', 'author_id': 3012, 'author_profile': 'https://Stackoverflow.com/users/3012', 'pm_score': 0, 'selected': False, 'text': '<p>I learned vi from the excellent O\'Reilly book <a href="https://rads.stackoverflow.com/amzn/click/com/1565924266" rel="nofollow noreferrer" rel="nofollow noreferrer">"Learning the vi editor"</a>.</p>\n'}, {'answer_id': 75099, 'author': 'Brian', 'author_id': 13264, 'author_profile': 'https://Stackoverflow.com/users/13264', 'pm_score': 5, 'selected': False, 'text': '<p>I\'ve been a on-again, off-again user of vim throughout the years (doing the occasional sys admin job).  I just recently started spending more time doing my programming work in it.  I\'d suggest starting with gvim too.  It integrates well with most OS environments, and (even better), you can fall back to the mouse when you need to :).</p>\n\n<p>To get going with vim, <strong>run through the vimtutor</strong> (bundled with gVim) once or twice (takes an hour or so).  I can\'t overstate how helpful it was for me!  Especially the first parts about the different ways to move through a document, and how edit actions are recorded with motion commands, etc, etc.  After that, things will be MUCH clearer.</p>\n\n<p>Then, start doing quick, minor edits with it (notepad-replacement stuff) \'till you are comfortable enough to do useful editing at a rapid clip.  Then try doing your day-to-day work in it.  You\'ll find yourself pining for the "repeat last action" command in other editors in no time!</p>\n'}, {'answer_id': 75101, 'author': 'sammyo', 'author_id': 10826, 'author_profile': 'https://Stackoverflow.com/users/10826', 'pm_score': 0, 'selected': False, 'text': '<p>Google is your friend. Keep a window or tab handy and when you have something that you need to do several times, say indent code or search with a regex, look it up. The best hints sites will become familar, bookmark some and perhaps print out a cheat sheet. </p>\n'}, {'answer_id': 75151, 'author': 'Eduardo Marinho', 'author_id': 13211, 'author_profile': 'https://Stackoverflow.com/users/13211', 'pm_score': 2, 'selected': False, 'text': "<p><code>ESC gg=G</code> to reindent code and <code>:retab</code> to convert tabs to spaces or spaces to tabs was what hooked me to vim. So actually you don't need to be forced to use it, you just have to learn when it can help you increase your speed.</p>\n\n<p>Go through <code>vimtutor</code>.  </p>\n\n<p>Start using vim for simple editing, like config files or html. Learn the commands as you need them.  </p>\n\n<p>Search google for a good .vimrc used by someone who uses a toolchain that resembles yours. Turn on syntax highlighting. Find a nice color scheme.</p>\n\n<p>Learn macros because Vim is the best for automated tasks and snippet insertion, like formatting a few words into a complex XML tag or converting a CSV to an HTML table.</p>\n"}, {'answer_id': 75193, 'author': 'ben.prew', 'author_id': 13185, 'author_profile': 'https://Stackoverflow.com/users/13185', 'pm_score': 2, 'selected': False, 'text': '<p>I remember when I first started learning emacs, it was after I was already very comfortable with Vim, and I was in the same or similar boat that you were, where I knew how to get a lot done in another editor, so as I started using emacs, it was always painfully slow.</p>\n\n<p>However, I think what you\'ll have to do is just absorb a little bit of the pain, and always, always, ALWAYS make sure that you look up the documentation for doing something that you <em>know</em> you can do in your previous editor, such as moving to the end of a line, or selecting a region of text.</p>\n\n<p>It also helps if you have a local vi-expert on hand that you can ask questions, or if you\'re like our company, you promote pair programming.  That way when you\'re trying to do something that should be easy, you can simply ask someone, they\'ll show you how, and if you\'re using the editor regularly for a few weeks, you shouldn\'t have to ask more then a couple of times before it becomes second nature.</p>\n\n<p>If you don\'t have any local resources, there are plenty of books/tutorials/reference sheets online that should be able to answer most of your questions.</p>\n\n<p>Ultimately, learning Vi is like learning other skills, there\'s no silver bullet, and you\'ll have to accept that, for a while, you\'re going to be less productive in it then your current editor.  Just keep telling yourself, "Other people have been able to learn Vi, and I\'m at least as smart as them" (That\'s what I tell myself anyway :) )</p>\n'}, {'answer_id': 75212, 'author': 'Roberto Bonvallet', 'author_id': 13169, 'author_profile': 'https://Stackoverflow.com/users/13169', 'pm_score': 4, 'selected': False, 'text': '<p>Every time you\'re doing a complex editing task, keep wondering if there is a more efficient way to do it.  Most times, when it\'s something that you can describe in simple terms (like "swap paragraphs of text" or "delete everything after the X character in commented lines"), it\'s something you can do in just a couple of keystrokes in vim.</p>\n\n<p>There are some key features that are extremely useful, and you\'ll end using all the time.  The ones I love the most are:</p>\n\n<ul>\n<li>Block selection (Ctrl-V)</li>\n<li>Macro recording (q)</li>\n<li>Virtual editing (:set ve=all)</li>\n<li>Regular expressions</li>\n<li>Piping to external Unix programs</li>\n<li>Key mappings</li>\n<li>Autocompletion (C-p, C-x C-p, C-x C-f)</li>\n<li>The operation+movement combination (this is amazingly powerful)</li>\n</ul>\n\n<p>Ask other programmers what features they find most useful and adopt the ones that fit better your brain.  Steal ideas from other people\'s <code>.vimrc</code>s (<a href="https://github.com/rbonvall/dotvim/blob/master/vimrc.vim" rel="nofollow noreferrer">here\'s mine</a>)</p>\n'}, {'answer_id': 75223, 'author': 'Jonathan', 'author_id': 3251, 'author_profile': 'https://Stackoverflow.com/users/3251', 'pm_score': 3, 'selected': False, 'text': '<p>I wrote a guide to <a href="http://jmcpherson.org/editing.html" rel="nofollow noreferrer">efficient editing with Vim</a> a while back.  You may find it helpful.</p>\n\n<p>I\'d step back for a minute and ask yourself "why do I want to learn this editor?  What makes me think it\'ll be faster or better than my current text editor?"  Then learn those features that will make Vi(m) indispensable to you.  </p>\n\n<p>For instance, Vim\'s CTags integration is completely indispensable for me.  I work with a very, very large codebase, and the ability to jump to a function or class definition in one keystroke (regardless of which file it\'s in) is an absolutely killer feature, one I have trouble working without.</p>\n\n<p>Use your .vimrc file to make macros that automate common tasks.</p>\n\n<p>Your autopilot editor-chooser will pick the editor that will get the job done quickest and with the least amount of mental effort.  A little prep-work will ensure that editor is Vim. :-)</p>\n'}, {'answer_id': 75263, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 4, 'selected': False, 'text': '<p>force yourself not. the path to mastery love is.</p>\n'}, {'answer_id': 75269, 'author': 'Kearns', 'author_id': 6500, 'author_profile': 'https://Stackoverflow.com/users/6500', 'pm_score': 0, 'selected': False, 'text': '<p>I would start with <a href="http://www.vim.org/htmldoc/editing.html#:argdo" rel="nofollow noreferrer">argdo</a>, and once you fall in love with that, the rest is easy...</p>\n'}, {'answer_id': 75286, 'author': 'DarenW', 'author_id': 10468, 'author_profile': 'https://Stackoverflow.com/users/10468', 'pm_score': 0, 'selected': False, 'text': '<p>Spend a couple hours at the vi lover\'s site  <a href="http://nereida.deioc.ull.es/html/vilovers.html" rel="nofollow noreferrer">http://nereida.deioc.ull.es/html/vilovers.html</a> - loads of tutorials, links, etc. with enthusiastic fans of vi. </p>\n'}, {'answer_id': 75359, 'author': 'Kristian', 'author_id': 12911, 'author_profile': 'https://Stackoverflow.com/users/12911', 'pm_score': 0, 'selected': False, 'text': "<p>I've started using VI because it's the default editor on pretty much every operating system except for Windows. Then again I don't do a lot of coding on Windows so that helps.</p>\n\n<p>If you want to force yourself on a *NIX/OSX system just remove the other editors or alias them. For the rest it's up to yourself. Everytime you don't use VI to edit a file you won't get a cookie.</p>\n"}, {'answer_id': 75447, 'author': 'Brian G', 'author_id': 3208, 'author_profile': 'https://Stackoverflow.com/users/3208', 'pm_score': 0, 'selected': False, 'text': '<p>I used it to edit files on the webserver which was linux instead of using FTP. That was 9 years ago and I have since mastered the skills.</p>\n\n<p>The other thing is find something great you can do in VI such as global search and replace or something even more powerful, and use VI whenever you need to do that.</p>\n'}, {'answer_id': 75530, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>You might want to start out with Cream. Cream describes itself as "a modern configuration" of vim. Basically, it is a special version of vim which looks and feels like any other text editor for all practical purposes. But enable the "expert mode" and you have all the power and behavior of vim.</p>\n\n<p>So you can start using Cream as a regular text editor and then experiment with the "expert mode" until you are comfortable enough to fully switch to vim.</p>\n'}, {'answer_id': 75545, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>One thing that I found really confusing in modern vi (vim?) is the input mode that allows for some, but not all features of command mode. I feel much more comfortable when input mode is fully dumbed down to "overwrite only, no cursor movement possible" kind of thing that old Solaris vi has. The true vi requires you to stay in command mode most of the time.</p>\n\n<p>That being said, there is no need to learn vi nowadays - emacs is just as ubiquitous. :)</p>\n'}, {'answer_id': 75548, 'author': 'user13060', 'author_id': 13060, 'author_profile': 'https://Stackoverflow.com/users/13060', 'pm_score': 2, 'selected': False, 'text': '<p>Install <code>gVim</code> on all platforms you use.</p>\n\n<p>Then run through the the vimtutor (<code>:help vimtutor</code> or <code>vimtutor</code> at the command line).</p>\n\n<p>Watch the following lecture and follow its advice: <a href="http://video.google.com/videoplay?docid=2538831956647446078" rel="nofollow noreferrer">7 Habits For Effective Text Editing 2.0</a></p>\n\n<p>I say you definitely want to start using it for all your editing. If you fear a loss of productivity then take a weekend to practice it solid (I once did this to switch to dvorak from qwerty and had my productivity high enough by Monday and managed to stick with it after).</p>\n\n<p>It\'s worth the effort and you won\'t look back!</p>\n'}, {'answer_id': 75622, 'author': 'Mark Witczak', 'author_id': 1536194, 'author_profile': 'https://Stackoverflow.com/users/1536194', 'pm_score': 3, 'selected': False, 'text': '<p>Two things that will greatly improve your vi skills:</p>\n\n<ol>\n<li>Practice, practice, practice</li>\n<li>Nethack</li>\n</ol>\n'}, {'answer_id': 76211, 'author': 'Steve Losh', 'author_id': 13498, 'author_profile': 'https://Stackoverflow.com/users/13498', 'pm_score': 0, 'selected': False, 'text': '<p>symlink every terminal editor on your system to vim and symlink every graphical editor on your system to a script that opens a new terminal window with vim running.</p>\n'}, {'answer_id': 77658, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>The way I did it was to take a few minutes initially to go over the most basic stuff -- moving the cursor around, searching forwards and back, jumping to next and previous words/sentences/paragraphs, etc.  Inserting, appending.  Whatever you can fit in your head.  Then, when you've got something to do that doesn't have to be done in the next 15 seconds, make yourself use it.</p>\n\n<p>When you're pretty comfortable with the basics, slowly learn the more advanced commands -- especially those that leverage your previous learning (like replacing the next 3 words, or deleting to the next search target)</p>\n\n<p>I love using VI, once I learned how.  The advanced commands are far more powerful than what most of the GUI editors seem to offer, and the fact that it's ubiquitous and text-based, and so available over ssh, is all the better.</p>\n"}, {'answer_id': 78784, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>If you force yourself to use it for a few days you will see that the commands soon become second-nature. If you are on a posix system, I recommend you start with the BSD-licensed nvi, a classical 1:1 vi clone, and then move on to vim. If you start with vim, it is likely you only use a subset of the editing commands because its INSERT mode is very similar to GUI editors.</p>\n'}, {'answer_id': 78825, 'author': 'tomasr', 'author_id': 10292, 'author_profile': 'https://Stackoverflow.com/users/10292', 'pm_score': 1, 'selected': False, 'text': '<p>Personally, what I had to do was make sure that I could use the Vim key-bindings (or at least, close enough) in several applications. Having to completely switch how I edited text whenever I changed editors made it too hard to get the Vim editing style committed to muscle memory.</p>\n\n<p>In my case, Viemu + vimperator did the trick.</p>\n'}, {'answer_id': 78832, 'author': 'titanae', 'author_id': 2387, 'author_profile': 'https://Stackoverflow.com/users/2387', 'pm_score': 0, 'selected': False, 'text': '<p>I have VI on Windows, the version I use is listed below, if I am in a console window I always default to VI, then regardless of what OS I am running on I know I can edit the file. Conversely if I am in UI mode, I use Notepad++ go figure.</p>\n\n<p>NT VI - Version 0.23\nDeveloped by:\n    Tony Andrews\nBased on a program by:\n    Tim Thompson</p>\n'}, {'answer_id': 78845, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Play lots of nethack.  That's what I did when I was in college, and I found out later that the cursor movement was the same.  Although at this point you may need to change the setting to use the vi style keymap.</p>\n"}, {'answer_id': 79010, 'author': 'Paulus', 'author_id': 14209, 'author_profile': 'https://Stackoverflow.com/users/14209', 'pm_score': 3, 'selected': False, 'text': '<p>My suggestion: start small. Just start by memorizing a small set of most useful commands. When I started vi, these were my top 10:</p>\n\n<ul>\n<li>(Esc)  to return to command mode (most important!)</li>\n<li>a      to add text after cursor</li>\n<li>A      to add text at end of current line</li>\n<li>x      to delete 1 character</li>\n<li>dd     to delete 1 line</li>\n<li>R      to replace text (overwrite)</li>\n<li>u      to undo</li>\n<li>:q! (Enter)  to quit without saving</li>\n<li>:w (Enter)   to save</li>\n<li>ZZ     to save and quit</li>\n</ul>\n\n<p>A lot of basic editing can be done using only these commands. Once you get comfortable, the rest don\'t look too difficult.</p>\n\n<p>BTW, I\'d like to add that I used to rely on vi for my primary text editor, but now only if I have to. In my case, productivity is better when I use tools like Emacs or Visual Studio (please note: "in my case"). Try more than one tool and choose the one that helps your productivity the most. Good luck!</p>\n'}, {'answer_id': 79097, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>I made myself a handy one-page cheat sheet and used it to learn all the non-basic features. However, practice is about the only way to master anything.</p>\n\n<p>vi is nice because it's on every UNIX-type computer, Mac OS X, Solaris, Linux. Find an old decstation box on eBay? It's got vi. How about Sun OS 4? vi again.</p>\n"}, {'answer_id': 80191, 'author': 'Brian Mitchell', 'author_id': 13716, 'author_profile': 'https://Stackoverflow.com/users/13716', 'pm_score': 0, 'selected': False, 'text': "<p>While i'm a great fan of vi in general, and vim in particular, there are many powerful editors, and you shouldn't feel you need to use vi, or it in some way is some absolute perfect editor, because it's not.</p>\n\n<p>If you have to force yourself to use vi, I would be concerned that you don't feel productive using it. However, if you insist on persisting, I would probably just make sure I used vi for every single editing task. Whenever I need to do something and I don't quite no the best way to do it, I'd try to find the optimal (in terms of minimal keystrokes) to do it in vi <em>after</em> I did it a non-optimal normal way. I'd then make a post-it note with this little tip (or maybe just a text file) so I would remember it for next time.</p>\n\n<p>Over time, your productivity with vi will dramatically improve.</p>\n"}, {'answer_id': 102478, 'author': 'webmat', 'author_id': 6349, 'author_profile': 'https://Stackoverflow.com/users/6349', 'pm_score': 0, 'selected': False, 'text': "<p>Why don't I pitch in with my very own low-friction way to force myself? :-)</p>\n\n<p>What I do is simple: I try to make my git commit messages with vim (default editor when you don't specify a message at the command-line).</p>\n\n<p>Of course a commit message is so short that it barely helps. But when re-editing a message with <code>git commit --amend</code> it's more helpful.</p>\n"}, {'answer_id': 106330, 'author': 'Jeremy Cantrell', 'author_id': 18866, 'author_profile': 'https://Stackoverflow.com/users/18866', 'pm_score': 0, 'selected': False, 'text': '<p>Do what I did. Use it for everything, and hang out in #vim on freenode.</p>\n'}, {'answer_id': 129975, 'author': 'webmat', 'author_id': 6349, 'author_profile': 'https://Stackoverflow.com/users/6349', 'pm_score': 0, 'selected': False, 'text': '<p>When you need to quickly search for something, having it all on one page can help. </p>\n'}, {'answer_id': 456031, 'author': 'Johan', 'author_id': 51425, 'author_profile': 'https://Stackoverflow.com/users/51425', 'pm_score': 1, 'selected': False, 'text': '<p>Use the post-it note method :-)</p>\n\n<p>When using gvim, allow your self to use the menus.\nRead a book/tutorial about vim so you know the basics.\n(insert and command mode)</p>\n\n<p>Select some really cool functions you think you need and write those on post-it notes \nand then stick those on the lower part off your monitor.</p>\n\n<p>A good start is probably \ni, a, o, gg, G, :10 ,/something</p>\n\n<p>and some cut and paste like \nyy, dd, p</p>\n\n<p>and just top off with \nv, V (the visual mode) + cut and paste</p>\n\n<p>Then when you know them, replace on post-it with a new one that has a even cooler function, \nand repeat until you are happy.</p>\n\n<p>/Johan</p>\n'}, {'answer_id': 456101, 'author': 'bk1e', 'author_id': 8090, 'author_profile': 'https://Stackoverflow.com/users/8090', 'pm_score': 3, 'selected': False, 'text': '<p>It sounds silly, but playing <a href="http://en.wikipedia.org/wiki/Roguelike" rel="noreferrer">roguelike</a> games (such as <a href="http://www.nethack.org/" rel="noreferrer">Nethack</a> or <a href="http://www.thangorodrim.net/" rel="noreferrer">Angband</a>) is a fun way to get comfortable with using the <code>h</code>/<code>j</code>/<code>k</code>/<code>l</code> keys for cursor navigation. </p>\n'}, {'answer_id': 464374, 'author': 'too much php', 'author_id': 28835, 'author_profile': 'https://Stackoverflow.com/users/28835', 'pm_score': 0, 'selected': False, 'text': '<p>I was forced to learn Vim for my first programming job when I was 16 (the boss wouldn\'t let us use anything else), but I didn\'t make any real progress until I read <a href="http://iccf-holland.org/click5.html#oualline" rel="nofollow noreferrer">Steve Oualline\'s Vim Book</a> - it is highly recommended as a starting point if you want to get serious with vim.</p>\n\n<p>Vim actually takes more time to master than do some programming languages (the features are <em>that</em> complex). Trying to \'master\' Vim by printing cheat sheets would be like trying to master Haskell by reading a couple of blog posts. Be prepared to invest some serious time and you will be well rewarded.</p>\n'}, {'answer_id': 834552, 'author': 'Hamish Downer', 'author_id': 3189, 'author_profile': 'https://Stackoverflow.com/users/3189', 'pm_score': 5, 'selected': False, 'text': '<p><strong>Step 0:</strong> learn to touch type. Seriously - if your fingers don\'t know where the keys are then vim is going to be a pain. And even if you reject vim, touch typing will <a href="https://stackoverflow.com/questions/31757/should-programmers-be-excellent-typists">improve your programming</a> (ask <a href="http://steve-yegge.blogspot.com/2008/09/programmings-dirtiest-little-secret.html" rel="noreferrer">Steve Yegge</a> ) by making the mind to monitor link friction free. There is a <a href="https://stackoverflow.com/questions/410880/how-do-i-improve-my-typing-skills">lot</a> of <a href="https://stackoverflow.com/questions/10475/touch-typing-software-recommendations">software</a> that can help you improve your typing.</p>\n\n<p><strong>Step 1:</strong> use <strong>vimtutor</strong> to get you started. It is in gvim (under\nthe help menu I think) or you can just type \'vimtutor\' at the command\nline. It will take 30-45 minutes of your time and then your fingers will\nknow the basics of vi/vim and you should be able to edit files without\nwanting to hurl your keyboard out of the window. </p>\n\n<p><strong>Step 2:</strong> use vim everywhere. See <a href="https://stackoverflow.com/questions/826208/making-vim-ubiquitous">this\nquestion</a>\nfor tips and links for using vim and vi key bindings at the command\nline, from your web browser, for composing emails, in your IDE ... You\nneed to use vim to embed the key bindings in your muscle memory.</p>\n\n<p><strong>Step 3:</strong> learn more about vim. You will only have scratched the\nsurface with vimtutor. You can <a href="http://video.google.com/videoplay?docid=2538831956647446078" rel="noreferrer">watch this\nvideo</a> or\nread <a href="http://www.moolenaar.net/habits.html" rel="noreferrer">this article</a> (both about\nthe "Seven habits of effective text editing". You can \n<a href="https://stackoverflow.com/questions/164847/what-is-in-your-vimrc">read</a>\nabout\n<a href="https://stackoverflow.com/questions/20735/useful-vim-features">tips</a>\nand\n<a href="https://stackoverflow.com/questions/726894/vim-tricks-your-mom-never-told-you-about-dark-corners">tricks</a> \non\n<a href="https://stackoverflow.com/questions/95072/what-are-your-favorite-vim-tricks">StackOverflow</a>.\nYou can browse <a href="http://vim.wikia.com/wiki/Main_Page" rel="noreferrer">vimtips</a>. Learn a\nlitle often would be my advice - there is so much out there that\nsticking to bite-size chunks will be the best way to make the knowledge\nstick.</p>\n\n<p><strong>Step 4:</strong> Profit :)</p>\n'}, {'answer_id': 834586, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>When I was a lot younger (eleven), my family moved to Germany for a couple of years. I was able to learn the language through immersion - I simply had no choice but to speak the language (although if I was in a dire situation I could find an English speaker). </p>\n\n<p>My suggestion is that you do the same - unless you\'re in an absolutely desperate situation (e.g. "ok, I just deleted /etc/passwd and need to put back root"), make the conscious decision to do your best with vi. It actually doesn\'t take that long to learn the basics, if you\'re willing. </p>\n\n<p>As others have suggested, </p>\n\n<pre><code>vim-tutor\n</code></pre>\n\n<p>can be a really good starting point, <a href="http://www.ekvin.com/dr/images/1/14/Vi_cheatsheet.png" rel="nofollow noreferrer" title="this image">as can this image</a>. </p>\n'}, {'answer_id': 858158, 'author': 'Aaron Digulla', 'author_id': 34088, 'author_profile': 'https://Stackoverflow.com/users/34088', 'pm_score': 2, 'selected': False, 'text': '<p>The main reason for me to use <code>vi</code> is <code>ssh</code> (or Putty on Windows): When you\'re logged into a Unix server remotely, then <code>vi</code> is always available. And it works with VT100 when neither the cursor keys nor backspace/delete are mapped.</p>\n\n<p>Also having a book like <a href="https://rads.stackoverflow.com/amzn/click/com/1565924975" rel="nofollow noreferrer" rel="nofollow noreferrer">VI Editor Pocket Reference</a> helps greatly.</p>\n'}, {'answer_id': 1828046, 'author': 'Excalibur2000', 'author_id': 126277, 'author_profile': 'https://Stackoverflow.com/users/126277', 'pm_score': 1, 'selected': False, 'text': '<p>How to force yourself ? My advice is to be in a work environment where you have to maintain 10 unix boxes by telnetting/puttying into them from windows. You will quickly realise that the only way to efficiently edit text on multiple variants of *nix is to use a standard editor that comes with almost every distro I know. Also, when X11 does not start up on a fresh install, vi is your only friend :)</p>\n'}, {'answer_id': 3464220, 'author': 'Myer', 'author_id': 78202, 'author_profile': 'https://Stackoverflow.com/users/78202', 'pm_score': 3, 'selected': False, 'text': '<p>EDIT: I\'ve created <a href="http://flashcarddb.com/cardset/135218-vim-flashcards" rel="noreferrer">a flashcard set over at the online spaced repetition site flashcarddb.com</a>, in case you\'re interested ... </p>\n\n<ol>\n<li>Use a spaced repetition flash card program such as <a href="http://www.mnemosyne-proj.org/" rel="noreferrer">mnemosyne</a>, <a href="http://www.supermemo.com/" rel="noreferrer">supermemo</a>, or <a href="http://ichi2.net/anki/" rel="noreferrer">anki</a> to incorporate learning and retaining new commands into your daily routine. It\'s not enough to be using vim as your daily editor. To master it, you have to be storing those codes in your head, laying in wait for the time when they\'re the ideal solution to the task at hand.</li>\n<li>Maintain a .vimrc with customizations</li>\n<li>Write or edit a vim plugin</li>\n</ol>\n'}, {'answer_id': 7769304, 'author': 'lang2', 'author_id': 172265, 'author_profile': 'https://Stackoverflow.com/users/172265', 'pm_score': 1, 'selected': False, 'text': '<p>I learnt vim/vi over ten years ago when I was doing my masters. Back then the only machine I have access to are Sun Sparc stations (Sparc 20 I think). And vi is the only thing that\'s on it. So one thing you can do to "force" yourself is to uninstall any other editor you have!</p>\n'}]
['https://Stackoverflow.com/questions/74625', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6349/']