How to turn Vim into a full-fledged IDE

If you code a little, you know how handy an Integrated Development Environment (IE) can be. Java, C, Python, they all become a lot more accessible when the IDE software is checking the syntax for you, compiling in the background, or importing the libraries you need. On the other hand, if you are on Linux, you might also know how handy Vim can be when it comes to text editing. So naturally, you would like to get all the features of an IDE from Vim.

In fact, there are quite a few ways to do so. One could think of c.vim which attempts to transform Vim into a C oriented IDE, or Eclim which merges Vim into Eclipse. However, I would like to propose you a more generalist approach using only plugins. You do not want to bloat your editor with too many panels or features. Instead, the plugin approach lets you choose what you put into your Vim. As a bonus, the result will not be language-specific, allowing you to code in anything. So here is my top 10 list of plugins which brings IDE features to Vim.

Bonus: Pathogen

First of all, we might not all be familiar with plugins for Vim, and how to install them. This is why the first plugin that I recommend is Pathogen, as it will allow you to install other plugins more easily. That way, if you want to install another plugin for Vim not listed here, you will be able to do so easily. The official page is really well documented, so go visit it to download and install. From there installing the rest of the plugins will be easy.

1. SuperTab

The first thing we get used to in an IDE is auto-completion feature. For that, I like the plugin SuperTab which comes in quite handy, giving "super powers" to the tabulation key.

2. Syntastic

If you tend to code in more than one language, it is really easy to confuse the syntax at some point. Hopefully, syntastic will check it for you, and tell you if should put brackets or parentheses for that conditional, or remind you that you forgot a semi-colon somewhere.

3. Auto Pairs

Another thing that drives most of the coders insane: did I write this last parenthesis or not?! Everyone hates counting with your finger all the parentheses you put so far. To deal with that, I use Auto Pairs, which automatically inserts and formats parentheses and brackets.

4. NERD Commenter

Then if you are looking for a quick shortcut to comment code, regardless of the programming language, you can turn to NERD Commenter. Even if you are not a programmer, I really really recommend this plugin as it just so efficient while commenting bash scripts or anything in your system.

5. Snipmate

Any programmer knows that a good coders codes, but an excellent one reuses. For that, snipmate will easily insert code snippets into your file and greatly reduce your typing. It comes by default with a lot of snippets for various languages, but you can also easily add yours to the list.

6. NERDTree

To manage a big project, it is always a good idea to split the code into different files. Just basic good coding practices. And to keep all this files in mind, NERDTree is a nice file browser to use straight from Vim.

7. MiniBufferExplorer

To complement a file explorer, there is nothing better than a good buffer manager to have more than one file open at any time. MiniBufferExplorer does the job well and efficiently. It even sets different colors for your buffers as well as easy shortcuts to switch the focus.

8. Tag List

When you have more than one file open at any given time, it is easy to forget what you put in them. To prevent that, Tag List is a code visualizer that will display the different variables and functions written in a nice compact format.

9. undotree

For all of us who like to undo, redo, and undo again some modifications to see how the compilation evolves, undotree is a nice plugin to see your undo and redo edits in a tree. This kind of functionality is clearly not limited to code, so this is a plugin that I like a lot.

10. gdbmgr

Finally, last but not least, anyone needs a good debugger at some point. If you like gdb, then gdbmgr is for you as it integrates the famous debugger to Vim.

To conclude, whether you are an insane coder or not, it is always handy to have a few extra functions of Vim at hand at any time. Like I said in the introduction, you do not have to install all these plugins if you do not need them, or you might want to install different ones. But this is definitely a solid basis.

What plugins do you use for Vim? Or how would you complement this top 10? Please let us know in the comments.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.

Adrien Brochard

I am a Linux aficionado from France. After trying multiple distributions, I finally settled for Archlinux. But I am always trying to improve my system by stacking up tips and tricks.

Latest posts by Adrien Brochard (see all)

14 thoughts on “How to turn Vim into a full-fledged IDE

  1. Dell, it looks nice that vim starts to catch up with Emacs, 15-20 years ago. All these features have I been using so long back, and they all come with a standard installation, all you have to do is turn some of them on.

  2. Ah, you all beat me to it.

    vi - in whatever flavour - has always been a kludge; it was, after all, originally the ":Visual Interface" to the ex line editor (ah, those were the days!)

    Morteza Ipo: Best emacs tutorial is simply to startup emacs and follow the instructions displayed, which include starting up the tutorial.

    Among the most profitable 30-40 minutes you'll ever spend.

    I've been using emacs for development for over 30 years, nothing else comes close IMHO.

  3. An IDE *understands the code you write*: It has a code model.

    That understanding of the code allows an IDE to
    * Rename things (functions, member variables, classes, whatever) with one keystrok
    * Do real syntax highlighting (not the regexp-based, but based on the AST of the language used)
    * Rewrite your code with one keystroke (e.g. mark a string as translatable, using whatever is needed for that language and code location)

    Bolting on a debugger to a -- admittedly powerful -- text editor does not make an IDE. None of these plugins provide anything that makes bothering to learn an IDE worth your time.

  4. Editors like atom come with 90% of the mentioned features out of the box, why worry? Unless you have to code over ssh.

  5. A lot of good IDEs now have vi editing mode, for those who realize that multi-modal editing modes are more efficient. A really good free example of this is NetBeans with it's jVi plugin. That's a pretty good IDE for Java, C, C++ and a few other languages.

    For Python WingIDE, though proprietary, has a nice VI editor mode and frankly whenever I run emacs I always turn on the vi emulator there as well. The standard emacs command interface with it's use of ctrl keys tends towards a case of carpal tunnel syndrome. The vi modal editing is more productive once you learn it.

    • And you know, Emacs comes with two different vi modes if you like that. :-)
      And all the other included packages that do all this and more.

    • And to fix the tunnel syndrome, switch places between left Ctrl and Caps Lock as IBM like they was suposed to be placed from the beginning.

      • I'll have to check that out in my copious spare time. The plethora of ctrl commands was one of the barriers I had to climb the emacs learning curve.

  6. Nice article, I did a similar one for my site, it's in spanish but you can see the plugin names:

    You miss one of the more helpful ones on your article: CtrlP. It has buffer explorer, mru files, files, tags et cetera that shows based on partial searches of the text as you write, in real time. For my profesional usage, it has replaced nerdtree, minibufexplorer, and a lot other plugins. There is also a similar Command-T plugin but I like CtrlP better because it doesn't require Vim to be compiled with Ruby support and this I can enable it on any Linux I ssh into.

    I didn't knew about Syntastic and undotree, they're awesome!

  7. Nice list. You did miss packages that search on tags, however. Either just pointing to a tags file generated by ctags, or (my personal preference) you can use cscope as well. Those are both built-in, but they are crucial in getting IDE-like behavior from vim.

Leave a comment

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