Pinterest Stumbleupon Whatsapp
Ads by Google

vim text editorIf you do any sort of development work on your computer, you’re going to need a text editor every now and then (or all the time). And by “development” I don’t just mean programming; it can be Web development too, or even maintaining and tweaking an existing website.

For years, I’ve tried one text editor after another. You name it, I tried it – jEdit, Notepad++, SciTE, PSPad, Komodo Edit… I’m not just name-dropping here. I used each and every one of these editors for over two months as my primary day-to-day editor. I also had a brief stint with UltraEdit, a venerable (but non-free) editor. Somehow, I couldn’t find an editor that just worked right, and was customizable enough to fit my needs.

That all changed a couple of months ago, when I bit the bullet and started using Vim text editor full-time.  Here’s 6 reasons why you should consider giving it a go.

Reason 1: Vim Is Old

vim text editor

In software, we often cultivate the mindset that says “newer is better”. We’re always after the latest browser, the latest OS, the latest game. But there’s a lot to be said for ancient pieces of software that are still actively used by lots of people.

Did you know MS Office was first released in 1990? That’s 21 years ago, and look how far it has come. That’s about the time Vim was first released, too (1991). Only Vim is based on a much older editor, Vi, that got its start in 1976.

Ads by Google

That alone should make you wonder; what makes such an ancient piece of software so compelling, that thousands of new users discover it year by year?

Reason 2: Vim Is Free & Has A Vibrant Community

Vim is actually defined as “charityware”, and is free to use and open-source. It does ask you to donate for orphans in Uganda, but there are no nags.

If you go to the Vim webpage, you will find lots of recent news items. I counted nine script updates in one day, for example. The site is constantly updated, and Vim’s main developer, Bram Moolenaar, personally posted an update on April 28.

Reason 3: Vim Is Very Customizable & Extensible

vim editor

Those scripts I just mentioned? They’re the key to much of Vim’s power. There are scripts for just about anything. In the screenshot above you can see FuzzyFinder, one of my all-time favorites. It’s a script that lets you type partial names of files, commands, help entries, etc. and searches for them incrementally, on-the-fly. You don’t have to type from the beginning of the name, and it’s got a lot of options – and that’s just one script!

Other notable scripts include NERD Tree that implements a file-system “tree”, SuperTab Continued for powerful tab-completion, and snipMate for replicating TextMate’s snippet functionality. There are lots, lots more.

Reason 4: Vim Works Over Telnet & SSH Connections

vim editor

I sometimes need to manually edit webpages that reside on remote servers. I used to use WinSCP to simulate local editing, but it broke every now and then. A few of the editors mentioned above also have built-in FTP clients, but navigating complex folder trees was always cumbersome and time-consuming.

With Vim Text Editor, I can just open an SSH connection What SSH Is & How It's Different From FTP [Technology Explained] What SSH Is & How It's Different From FTP [Technology Explained] Read More to my Web server and run a remote instance of Vim right on the server. Vim is designed to work with slow terminals, so it actually feels fast. As you can see in the screenshot above, colors work just fine over SSH. Being able to work directly on the server has made a huge difference in my Web development work. Not only is it faster, but I can now search through files right on the server, and use Vim to jump between the results quickly and find exactly what I need to modify with pinpoint precision. Simply awesome.

Reason 5: Vim’s Configuration Is Portable

vim editor

As mentioned above, Vim is very customizable. That means I had to work quite a bit until I got it “just so” on my Windows system. Having to do all that on my remote server would have been a bit of a drag. Luckily, I simply needed to copy a few directories and one all-important “master configuration” file, called .vimrc.

This basically copied my entire configuration from my Windows computer to the remote Linux server. I then just edited my configuration file and modified a couple of things for the server, and I was basically done. Of course I couldn’t keep myself from tweaking things further, but that’s just me.

Reason 6: Vim Is Thoroughly Documented

Note that nowhere on this list does it say “Vim is intuitive”. That’s because it’s not, really. There is a learning curve when you first start using Vim, and it does require a bit of a commitment. But there are quite a few things that can help. Here are just three examples:

vim text editor

  • PeepCode’s Smash into Vim screencasts (shown in the screenshot above): These are actually not free; they cost $12 each (there are two), but are a very worthwhile investment. When I decided I wanted to give Vim a serious spin, I bought the first one and watched it. It was enough to get me started with confidence. It wasn’t boring, either.
  • Vim’s own *:help* command leads into a treasure trove of carefully-written documentation. Every script has its own documentations; default key bindings are carefully documented, all of the commands are explained, etc.
  • Vim also has a wiki with oodles of tips, tricks and helpful code snippets for you to copy and try.

Reason 7: It’s Way Better Than Emacs

OK, so maybe I’m not entirely serious about this last one. As you may have noticed in the introduction, I’ve never actually given Emacs much of a spin (not for two months, at least). According to the scientifically-minded $EDITORs Sucks-Rules-O-Meter, Vim seems to be in the lead in the Editor War, at least for now. But I’m willing to be convinced otherwise. You’re welcome to plead Emacs’ case in the comments.

Speaking of comments: if there are any Vim users in the audience who’d like to share tips or ask questions, I am all ears. I know I’ve barely scratched the surface on Vim in this post, so if you’d like to see more detailed posts about Vim, do share your ideas and wishes.

  1. daniyal141
    August 26, 2016 at 3:31 pm

    I just love Atom when I have a DE. When I don't, nano is my editor of choice. I don't have that "learning curve" stuff that most people have, but apparently Vim has made that a reality for me. So has Emacs.

  2. Alex
    May 5, 2016 at 2:43 pm

    Check out vundle, it makes installing vim packages super easy.

  3. omrisim210
    March 4, 2016 at 3:59 am

    You should try Spacemacs, it's an emacs config meant mainly for vim users (but it also has an emacs mode). It has some awesome configuration options and it's really awesome, plus SLIME is basically one of the only ways (if not the only one) to learn common lisp nowadays. I switched to spacemacs from vim and i'll never look back (well i do use vim for some simple script/config file editing but that's just because it's a habit to just open guake and tinker with stuff in vim)
    btw i don't even use "vim", i use neovim, it's way better. look it up!

  4. Panait Ciprian
    October 12, 2015 at 10:12 am

    Although I still use vi/vim from time to time I find it horrible. I usually use nano or copy/paste the file and use gedit. As a programmer I have enough of time spent understanding what the person before me tried to do but failed and fix the mess and I cannot afford to just do a thousand switches between the many modes of vi because someone could not write a proper editor.

    • Stefan
      May 18, 2016 at 4:34 pm

      Vi(m) has only three modes, and switching between them is much faster than using a mouse. The modes allow you to keep your hands on the main part of the keyboard, without reaching for cursor keys, function keys, etc. As a programmer, I don't have time to use anything but vim. If you're experienced with vi/vim, it's faster to use than anything else.

  5. Peter Kaagman
    August 29, 2015 at 9:58 am

    The one most important reason for me to use Vim is that it is available for whatever system I log on to. On Linux systems it's probably even pre-installed. Be it Vim itself, VI or even Elvis on Slackware systems...
    Next week I'm going to have to use my first Mac, and there are probably zillion of "better" Mac editors, but the very first thing I'll do is download and install Vim.
    To be quite honest... I'm just to lazy to learn another editor.

    • Daniel Toebe
      November 2, 2015 at 5:16 pm

      Nope no better editor on mac... On Mac install homebrew (package manager) then google gnu tools on mac, to get the "proper" cli tools on your mac. But before you install vim or macvim (like gvim, but w/ better mac integration) type `brew info' vim or macvim to see the compilation options

    • cyp
      May 18, 2016 at 9:18 pm

      i have neither the will or time to waste learning vim. a text editor should be intuitive . you should not need to learn to use it. vim is counter intuitive and in my personal opinion an example of how not to design software.

    • 10basetom
      June 9, 2016 at 4:45 am

      "i have neither the will or time to waste learning vim."

      Learning vim is not a waste of time (well, maybe it's a waste of your time if you're not a code ninja). If you are a ninja and a text editor is your weapon, then learning vim is like mastering the shuriken. You may not like it, and you may even cut yourself while learning how to wield it, but once you've mastered the art of shurikenjutsu you'll become the most badass ninja in the fiefdom, able to dispatch your enemies with the utmost efficiency.

      "a text editor should be intuitive . you should not need to learn to use it."

      Vim is not only a text editor -- it is like its own programming language, hence the power and flexibility that are often ascribed as "magic". Like any programming language that was ever invented, it takes patience and perseverance to get your head around it. Vim is not Notepad.

      "vim is counter intuitive"

      If you are used to a mouse-driven interface, then switching to something that is wholly keyboard-driven is not unlike diving head first into functional programming after you've only been exposed to imperative programming all your life. It is not that it's counter-intuitive -- it is a paradigm shift.

      However, to give a different perspective on the merit of intuition, here's a little anecdote from someone who first hacked around with vim from 1994-1995: after not touching vim (or a Unix prompt, for that matter) for over a decade, I found myself editing some code in vim again. It felt strangely familiar, like a pair of your favorite jeans that your mom threw away because they were all torn up at the knees and frayed at the bottom. I wanted to indent this one line without entering edit mode, so by intuition I tried hitting the ">" key twice. By golly, it actually worked :).

      "and in my personal opinion an example of how not to design software."

      There's a very good reason why vi, and by extension vim (vi improved), still has millions of passionate users after almost 40 years in existence. You don't get this kind of track record by designing poor software, especially in a field driven by people who know a thing or two about software design. Some would argue that modern GUI editors consuming hundreds of megabytes of RAM is a sign of how not to design software.

    • Panait Ciprian
      June 9, 2016 at 7:56 am

      " if you’re not a code ninja" i detect someone that has seen too much naruto and has no idea about how real ninja's operated.
      1. the shuriken were not used as weapons. They were used as ways to distract the enemy while you escape or do a surprise attack. They never intended to dispatch enemies. Also the biggest part of a ninja work was infiltration and gathering intel not fighting. They could fight if need be but that was not their main purpose. As a result they did not wear ninja suits but rather normal clothes. Also the text editor is not my weapon. My brain is my weapon. Writing the code takes very little time, understanding what you need to do and such takes time.
      2.that is dumb. an editor should be simple and intuitive
      3. yes it is a good reason, but it is not a good one. because current programmers were tortured into learning this dumb editor they will do the same to the future generations to get a form of revenge.

  6. ViDestroyer
    May 6, 2015 at 7:03 pm

    You are crazy

  7. Vagif Verdi
    May 26, 2011 at 6:32 am

    vim is used mostly by unix/linux admins to edit bash/python/perl scripts and various configuration files.

    But if you are a programmer, you are seriously missing for not trying emacs. For many non mainstream languages like lisps (CL, clojure, scheme), haskell etc, emacs is the most powerful IDE available today.

  8. Anonymous
    May 18, 2011 at 2:15 pm

     Vim is great on it's own, but it's true power comes from it's highly extendable and configurable nature. Many users have benefitted from using a preconfigured (and customizable) vim distribution Spf13 Vim. It's primarily focused on development and ease of use while sticking to established vim standards. It's completely cross platform, so you can use the same configuration on your desktop and server. 

    • Anonymous
      May 19, 2011 at 2:18 pm

      That's pretty interesting. How does it compare to Cream? 

    • Anonymous
      May 19, 2011 at 2:42 pm

      Cream's approach is completely different. Cream attempts to make vim more like other desktop software with a set of key reamapings ... like Ctrl+c for copy and a bunch of menus. I'd argue at that point, why use vim at all? If you learn cream, you'll be completely unable to use stock vim, with Spf13-vim you'll feel right at home.

      Spf13-vim's approach is to stick to vim's approach to things.  Spf13-vim provides a richer set of features without changing the way vim works. For instance it provides snippet functionality and a rich set of code snippets for a ton of languages.. but this doesn't alter the way vim works. It provides syntax checking for php, python, c and ruby. 

      If you like vim and the way vim works, but feel like features like autocomplete, snippets, git support and more would make vim even better, than checkout spf13-vim. 

      If you want an awkward mashup of vim and notepad, choose cream.

    • Anonymous
      May 19, 2011 at 2:56 pm

      Nice take indeed. I looked at Spf13's page and I see what you're saying.

  9. emaniacs
    May 17, 2011 at 9:18 am

     i like VIM and Emacs,,
    but i usually use vim just for litle editing like viewer or customized some of code..
    when i create a big project absolutelly i use Emacs.. 

  10. ezuk
    May 16, 2011 at 11:52 am

    That's an SSH session with PuTTY and the Solarized color scheme: http://ethanschoonover.com/sol...

  11. Justin
    May 16, 2011 at 6:20 am

     I use Vi/Vim quite a bit for quick editing, and managing my VPS's. As I've been getting more and more used to it I keep inching towards using it over my other editor(s). You convinced me to try out the 'Smash into Vim'.Thanks for the post :)

  12. B.
    May 16, 2011 at 5:34 am

    And yet you're using it on windows. Why should you be taken seriously ?

    • mike
      May 17, 2011 at 12:29 pm

      Because it works on Windows?  I learned vi while in university on Unix boxes, and continue to use it now at work & home on Windows machines.  Yay for cross platform software! 

  13. Garry Blackmore
    May 16, 2011 at 3:00 am

    Putty, but it's a version called Puttytray with cosmetic improvements and such. You can find it here: http://haanstra.eu/putty/http:...

  14. David
    May 16, 2011 at 12:33 am

    Vim has been my programming editor of choice for years now but I *still* feel as though there is a world of vim magic that I've yet to really master.  One good example of this is the "g" command, which is powerful enough to reverse a file as simply as :g/^/m0 

  15. Mih
    May 15, 2011 at 11:24 pm

    +1 for emacs.

    I tried using Vim when I had still not known Emacs, but found two things annoying:
    - having to move my hand to hit 'Esc' to change mode
    - need to constantly focus on the status line to see which mode I'm in after performing some text operation

    Now for most people it might be second nature to do the above, but somehow my brain could not cope well with such minor tasks. 

    With emacs it has been easy sailing and not to mention the commands seem to me more intuitive. + {b,f,p,n} seemed easier to remember without practice that + h,j,k,l.

  16. Chris Gonnerman
    May 15, 2011 at 10:13 pm

    I tried to like emacs, I really did... but vim is just so darned efficient.  It's not how you type in it, it's how you do "ex" mode commands.  I REMEMBER the CTRL being where CAPS LOCK is... and I didn't like emacs then.

  17. Raimon Grau
    May 15, 2011 at 10:09 pm

    Both vim and emacs have more features than you probably can remember.  I started with vim, then went to emacs, and now using emacs with vimpulse plugin, that gives you the basic modal usage, and the extensibility of elisp.

    Best of both worlds? Worst of both worlds?
    You decide :)

  18. Anonymous
    May 15, 2011 at 10:08 pm

    What application is that under the fourth reason?

    • Garry Blackmore
      May 16, 2011 at 1:00 am

      Putty, but it's a version called Puttytray with cosmetic improvements and such. You can find it here: http://haanstra.eu/putty/http://haanstra.eu/putty/

    • Anonymous
      May 16, 2011 at 9:52 am

      That's an SSH session with PuTTY and the Solarized color scheme: http://ethanschoonover.com/solarizedhttp://ethanschoonover.com/solarized

  19. p4bl0
    May 15, 2011 at 9:58 pm

    To be more serious about the vim/emacs thing, I think five of the six (not counting #7) real reasons you gave also apply to emacs. Emacs is also old, it's also free, it also as a vibrant community, it also works over telnet and ssh, it's configuration is also portable and it is also thoroughly documented (with it's own help (hey, type C-h C-h it's the help's help ;-p) and wiki and websites and blogs... just like vim!).

    The one point where they differ is on extensibility and customizability and on this point it's only the truth to say that emacs wins hands down. Emacs has a real programming language to build extensions, emacs lisp is very powerful.

    The real choice between emacs and vim is a matter of taste. Because they both embrace different philosophies and thus different design choices: yes, it's a design choice in vim to not be as much customizable and extensible as emacs, and some people I know and respect prefer vim over emacs for that very reason.

    I'm an emacs user myself and I love my editor, I occasionaly have fun trolling on this subject but really I know vim is *also* a good editor.

  20. Vim on Kindle
    May 15, 2011 at 9:42 pm

    There's a good Kindle book on Vim: http://www.amazon.com/Vim-Vi-T...

  21. Vim on Kindle
    May 15, 2011 at 7:42 pm
  22. stan r.
    May 14, 2011 at 7:13 pm

    Beginner Tip: The Caps Lock key is your enemy!

    • Jayess Aymes
      May 15, 2011 at 9:15 am

       xmodmap to swap and is your friend :)

  23. Thameera
    May 14, 2011 at 5:49 pm

     Vim all the way. The reason why some people hate it is that they stop learning after a few keystrokes. As mentioned in the article, you have to commit a bit at first into learning it and once mastered Vim becomes indispensable.

  24. Maredsous10
    May 13, 2011 at 7:19 pm

     Derek Wyatt's Tutorials 
    http://www.derekwyatt.org/vim/vim-tutorial-videos/

    Drew Neill's Vimcasts
    http://www.vimcasts.com

    • BRMatt
      May 15, 2011 at 10:26 pm

      Vim casts is one of the best vim sites out there! The guy goes through tutorials step by step and references all the keys he's pressing - a godsend when it comes to an editor like vim.

    • Matt Wilkie
      May 16, 2011 at 6:07 pm

       that should be http://www.vimcasts.org (or drop the www, and do just vimcasts.com, which redirects to .org anyway)

  25. Eriknowakowski
    May 13, 2011 at 4:52 pm

    Where is the poll about what we use?
     

  26. ArtemZ
    May 13, 2011 at 2:14 pm

    better than emacs? no way

  27. emacslover
    May 12, 2011 at 11:59 pm

    Emacs rulez. VIM is practically the only editor out there where you have to constantly switch between modes. When I use a text editor I like it to actually display and change text when I press keys on my keyboard, not beep annoyingly.

    • jeffjose
      May 13, 2011 at 2:55 am

      No disrespect to Emacs, but the only reason why I would never try/use Emacs is because of that. I love my pinky finger way too much to do chorded key-bindings. Ctrl-this, Ctrl-that.

    • Mickey
      May 15, 2011 at 9:52 pm

       This one can be laid at the door of keyboard manufacturers. I bet your keyboard has the CAPS LOCK key, which you almost never use, in prime position on the left. If that was the CTRL key, the emacs CTRL chords would be so easy. That's where the CTRL key is meant to be, and that's where it was when emacs was born. I remapped it to CTRL and suddenly emacs CTRL chords are so much easier, so much more elegant. It makes an enormous difference.

    • Tina
      May 16, 2011 at 9:30 pm

      Great suggestion, Mickey!

    • mike
      May 13, 2011 at 2:14 pm

       Vim is my #1.  Tip:  if it beeps when you press keys, you're doing it wrong.
       

    • Anonymous
      May 15, 2011 at 10:26 pm

      Actually this is a BIG vim feature that allows you to separate command editing mode vs editing.

      Don't think about easy stuff like delete a character or going left... If we consider only these features then you're right, having mode-switching is useless.

      But if you want to do things like "add an empty line after each line having a given pattern" *interactively* like if you were in a REPL then you will soon understand that having a command mode is a blessing and a very very very very powerful thing to have. 

Leave a Reply

Your email address will not be published. Required fields are marked *