Posts Tagged ‘Oracle’

call me hypocrite

Tuesday, August 11th, 2009

I feel guilty about saying I hate TOAD in the last post after spending the last 3 months with it open.
In fact, it’s the only application that’s open on every Virtual Window on my work machine.
I hate editing in TOAD. I like its autoformatting, love its schema browser and filtering on data grids, and love love love the fact you can read the script for tables, views, etc.

Vim’s too powerful to ignore.

In a perfect world I could run vim as my editor in TOAD; I haven’t figured out how to do that yet.

Compiling PL/SQL from VIM

Wednesday, May 20th, 2009

I don’t think I’ve extolled the virtues of vim, but it’s my favorite text editor by far. Whenever I’m in something that’s NOT vim, I can feel the pain.
What should take 3-4 keystrokes involves mousing and an excessive amount. Auto-indent, appropriate tab stops, shift widths, all that stuff is touch and go depending on the IDE and the time you want to take to configure it.
With vim, I sit in a .vimrc, set everything up the way I want it, and never deal with trivialities like that again.

Lately I’ve been stuck in PL/SQL-land – a chunk of new development in Oracle Time and Labor and some Pricing procedures I’ve been trying to optimize. I’ve been using TOAD, but I actually hate TOAD with most of my black little heart. Its Find functionality is spotty at best, and the amount of keystrokes/navigation is a pain in the butt even when you’re using hotkeys and bookmarks.
The newer version’s code folding is nice, but clutters the screen to a great extent.

The biggest pain, though, is just knowing it’s so damn inefficient when compared to a real text editor.
I’ve had 2-3 times in the last week where I realized a set of code should be sitting in an IF/ELSE construct. In vim it’s typing IF blah THEN, tapping j, then >>, then . for every line I need indented. Takes about 3 seconds tops. In TOAD I have to navigate, tab, then go to the beginning of the next line, hit tab, etc. ad nauseam.

So, naturally I want to use vim. I don’t want to be alt-tabbing and copy/pasting into TOAD to compile, however; I want to just compile in vim with :make.
Lo and behold:
The Answer To My Problem

This is awesome. I got it working today after an hour or so of fiddling with it. I would consider this my greatest accomplishment this week.
My boss would be enraged to hear it, I’m sure.
“You have deadlines!”

Yeah, I do.
And now that I’m vimming it up for PL/SQL, I’ll meet them easily.