Sunday, July 15, 2007

jVi and Netbeans

I found jvi.sourceforge.net the other day and I'm pretty smitten with it. It gives you a good implementation of viMproved in Java and integrates it with the IDE. I've been using NetBeans because that's the one the author is currently using and I just always think Eclipse is too slow. Netbeans too can hang at times which annoys me, but overall the jVi editor is fairly quick. NetBeans also has good Maven2 support through MevenIde. Our newest project at work is using Maven2 for it's builds, which I have mixed feelings on. It certainly forces you into a "right way" mentality which I wish some of our other projects had.

I'm getting pretty comfortable with NetBeans after the last 2 weeks or so, and I like it alot. Anyone who's worked with me know's I'm a miceless freak, and NetBeans does pretty good at letting me be 90% miceless. Here's a sample of how I work.

Ctrl-1 (Pop's up the project navigator) Arrow keys, pgUp, pgDown, and I believe Enter will open a file. You can also type a file name and it will find the first item listed in the tree and display it. Fairly slick, not quite as nice as ":new" sometimes, but it's also got it's advantages when bouncing between multiple packages. Tab-Completion would certainly be nice.

Ctrl-4 (Takes you to the output, I've thought about rebinding but this is the default and so I'm using it for now.)
You can hit shift-escape to fullsize the window which I do as I keep it small at 4 lines or so. Then you get a full build result view you can look at and just hit shift-escape again to get back to your normal tiled view.

I should note that all of the right tiles are just buttons that are sideways and pop up their window when you mouse over. The output window is about 4 lines at the bottom. I found this to be best as I really need the "Project" and most other windows to be big to be helpful, but they clutter the screen too much for my likes. The Ctrl-1 integration makes it nice, when I want something I hit the key and there it is, when I'm done it dissapears. Although, this layout is good, I still think I should be given like 30 pixels every direction back. But oh well.

I bound "Ctrl-E" to the editor, so that get's me back into jVi. I generally think Netbeans should keep you in the editor more, but that may bug me in other ways, so I could be wrong. Ctrl-Tab swaps between open windows. It can be slow loading up the Ctrl-Tab window list for some reason, which is probably my biggest annoyance. It may just be a more memory desired issue, or windows swap, both of which I probably could help it out with.

F11 Builds and Shift-F11 cleans before building. I used a cygterm window to do this for the first week or two. I'd just alt-tab and then hit up to get the command and return. It's nicer to have build errors hyperlinked to the code in NetBeans. I suppose I could have just got the maven / javac integration working from within vIm.

The biggest reason I've been keeping NetBeans is it's database browser and it's interface for running SQL. It's missing a couple of features like SQL history, but it's about as quick as the isql command line utility. So the DB commands make me like it allot. I kept coming back to it when I was doing database work for a bit of coding I was doing via vi on the AIX command line. Now I'm soo hooked on NetBeans, I'm trying to get everything done in it.

One issue I have had is getting our TomCat project to run in it. Just running the "mvn tomcat:run" crashes for me (some concurrent map mod or something, so it's probably running inside NetBeans with some JVM issue). I also haven't figured out the built in tomcat shipped with the NetBeans server, but maybe someday soon I'll sit down and finish figuring it out.

Overall, NetBeans buys me a few niceties like accurate code completion and perfect cscope ( "Ctrl-] from jVi" ) like functionality. It's a bit slow to startup, probably because it's building some large data structures, but it happily sits at 200 MB most of the time. I probably should bump it's max mem allowance up to 512 and see how that does (then again it may never need it.), but half of the slowness on startup seems to be the laptop hard drive. I still think a lightweight IDE written in C and built around vIm would be the best, but you've gotta take what you can get. The clewn project, is certainly a great first piece of that with the slickest GDB integration I've ever used.

0 Comments:

Post a Comment

<< Home