At the time of writing this post VoraX 1.8 was already released. Frankly, I'm pleased about the results. My target was to have a lightweight, simple and efficient Oracle IDE based on VIM. From this point of view I think that, in many ways, the goal is achieved.
In my opinion, a decent Oracle IDE should have:
- basic features to query the database
- code completion
- plsql editing/compiling support
- a database browser/explorer
- navigation through the package code structure
- SQL statements formatting
- source control support
- the possibility to extend the provided features
Nowadays, it's not very difficult to find out such an IDE (commercial or open source)... but, if you are a VIM addicted guy (like me), you'll soon discover that no editor is better than VI. Furthermore, coming back from VI to a fancy Oracle IDE is such a pain. In those environments I always start editing with "jjj", "kkk"... WTF? It takes a few seconds to realize I'm not in my friendly VI editor.
In this post I'm going to show you how to configure VIM/VoraX as your new Oracle IDE. First of all, dont't forget VoraX is just a plugin therefore is critical to have your VIM properly configured. I know you already know that VIM is highly customizable therefore it's up to you to configure it so that to be the perfect editor you always wanted. Useless to say, VIM provides an "eco-system" of plugins which may prove to be quite useful. You can browse them on the official vim site but, as far as VoraX is concerned, we'll be especially interested in the following ones:
- vcscommand: allows working with various source control systems.
- bufexplorer: provides navigation through VIM buffers.
- supertab: may be used to invoke code completion using the TAB key, much more convenient than C-X C-O.
- NERDTree: a nice file browser directly in VIM.
- NERD Commenter: maybe used to comment the code.
- xptemplate: provides nice snippets/templates. These are met in many modern IDEs.
- taglist: may be used to browse the code structure.
- align and SQLUtilities: provides SQL beautifier functions.
If you look at the above plugins and the features they provide and add all the advanced features of VIM itself, you realize we're quite close to what a modern Oracle IDE might be.
Below is my .vimrc configuration file. Once again, it's up to you to configure it as you want. These are the settings which, over time, proved to be the best for me:
Okey, now some comments about the above settings, other than the ones directly specified into the script. First of all, what's with the mapleader setting? Well, by default, leader key in Vim is \. On my keyboard this is hard to type and I really don't want to broke my finger reaching for such an used key. Instead, this is remapped to "," which is very convenient to type. Second of all, what's with that "jj" remap? Personally, I don't like to type "ESC" key whenever I want to exit from the insert mode. Pressing "jj" is, again, very convenient.
Pay attention also to all new mappings used to navigate through VIM windows. I think it's much better than C-w j, C-w k etc. <leader>bd is also nice because it allows deleting the last buffer without closing its window, otherwise all remaining windows will be rearranged and this will mess up your layout.
The other settings I guess are obvious and do not deserve the time to explain now here. Of course, customizing VIM is a never-ending story but that's the beauty, really.