Wednesday, February 6, 2008

NetBeans IDE with jVi plugin

My last post dealt with using the vim taglist plugin. This plugin provides an overview of the structure of source code files and allows you to efficiently browse through source code files in different programming languages. One could say that the taglist plugin makes vim "feel more like an ide."

Today, I would like to discuss a method to use a vim-like editor inside of an IDE--that is, to make an IDE feel more like vim. There are several IDEs available. When I began searching for an acceptable IDE I had two criteria. First, the IDE must be free. Second, the IDE must have vim emulation.

The NetBeans IDE was the only IDE that I found that met my criteria. I thought it was pretty smooth for the most part. I have not tested it much, but the vim emulation was good. I did run into some issues when working with a maven2 project.

NetBeans can be downloaded from http://www.netbeans.org. The jVi plugin can be downloaded from
http://jvi.sourceforge.net and consists of a zip file that contains two .nbm (NetBeans Module) files. The jVi plugin is a port of a large portion vim, not just a set of keybindings. If the plugin doesn't work like vim then it's a bug. After downloading and installing the NetBeans IDE and downloading and unzipping the jVi plugin, the plugin can be installed in the following manner:

  1. Open NetBeans and browse to Tools -> Plugins
  2. Click the "Downloaded" tab
  3. Click the "Add Plugins..." button
  4. Browse to jVi directory that contains the .nbm files
  5. Select both .nbm files and click "Open"
  6. Make sure "jVi KeyBindings" and "jVi Core" are both selected for installation and click "Install"
  7. Proceed through the plugin installation wizard."

    The jVi plugin will be activated automatically. You can disable it by un-checking jVi in the "Tools" menu. Here is a screenshot of NetBeans with the jVi plugin installed:

    NetBeans IDE with JvI plugin

    P.S.

    I ran into a problem trying to run NetBeans on openSUSE 10.3:

    bean@cobweb:~/netbeans-6.0beta1/bin> ./netbeans
    java: xcb_xlib.c:52: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
    (truncated)

    To fix this problem, I had to set the following environment variable:

    export LIBXCB_ALLOW_SLOPPY_LOCK=1

    This is due to bug 252510

1 comment:

Unknown said...

algolint is best online website dealing with all kind of online complier and online ide.. code snipets and compile and execute program online can be access and an be deal with no issue and erros free