Sunday, November 14, 2010

3 Plugins to make VIM a true IDE

Let's see how to install 3 plugins that will help your vim or become closer each time to be a real IDE. I must say that since I started using it I am fascinated with this editor that although costs a lot to learn to use it at first, it is worth. But until now, had some disadvantages compared to a real IDE like Eclipse or NetBeans because it lacks some amenities that these programs offer.

But as always in this world of open source, there are solutions to any problem and in this case are the plugins, there are thousands of plugins for vim, I'll tell them how to use and install 3 of them that have served me well and are as I said to use vim as an IDE.

NERD Tree

This plugin is useful to have a directory tree and can more easily move the files that make up our project. To install we go to this page and download the latest version of the plugin. Unzip it to go down and we will have 2 folders (plugin and doc) and within each folder 1 file.

To install the plugin should just move those files to the folders with the same name but are located in ~/.Vim

If those folders are not we create them. And ready ... plugin installed. Now we have to call to use the command: NERDTreeToggle from vim. But as it is very difficult to memorize going to create a keyboard shortcut by adding the following in the file ~/.Vimrc (create it if you do not):

  • map <F2> :NERDTreeToggle<cr>
With what now you can show or hide the directory tree by pressing F2. The plugin is running something like:


Taglist

This plugin used to have easier access to functions, and blocks within our code. It is very useful if you have a large file and want to move easily between functions and procedures.

This plugin requires that you install "exuberant-ctags" that surely is in the repositories of any distro they use. After that you should go to this page and download the plugin. Again within the compressed folder, we encountered 2 (doc and plugin) and repeat the process above to install this plugin.

To use it we have to invoke the command: TlistToggle from vim. But as it is very difficult to memorize going to create a keyboard shortcut by adding the following to the file ~/.Vimrc (create it if you do not):

  • map <F3> :TlistToggle<cr>
With what now you can show or hide the directory tree by pressing F3. The plugin looks like this:


NERD commenter

The last plugin will see today. He gets here


and installed as the previous. Serves to facilitate the task of commenting, especially large blocks of code comment. Besides that recognizes the language we are using and comments are obviously suited according to that language.  

To use it select a portion of code in visual mode and press the combination ",cc" ... without the quotes of course. No I will show how code is because it is only said :p I hope they serve and encouraging vallan vim because actually prove worthwhile.
If this article was useful and you want to help us to grow Subscribing to our feed or Click "Like" in our Facebook page ,or follow us via Twitter or subscribing to our feed.

People who read this post also read :



0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More