I write perl in vim. I’ve always written perl in vim. However, after having a period of writing java in NetBeans a while back, there are some things i now wish i had for my perl projects: Code refactoring.
I have an application consisting of multiple scripts, each of them interacting with a postgresql database. This application started out as a small hack, but suddenly it grew into a myriad of scripts totalling a few thousand lines of code and a monstrosity of a database. While this is fine, there are some things that i would like to fix with the database to make it more maintainable in the long run: Rename a column here, change a datatype there.. you know, small stuff.
Are there any tools that allow me to do this, while also looking up any references to said columns in the scripts that interact with it?
I’d rather have some nice automated refactoring than the tedious manual renaming, as that’s too prone to fungerfudges, plus, i’d love to have a proper set of dev-tools rather than just vim in the long run.
This is all being done over an ssh session, by the way, so any fancy GUI-based IDEs are also out of the question.
App::EditorTools provides some lightweight refactoring CLI tools. Using App::EditorTools::Vim you can incorporate these directly into Vim.
Peter Blair has a little video of it in action at http://petermblair.com/2009/10/perl-vim-refactor/