Tuesday, May 25, 2010

ANN: refactor v0.1.0 released

Hello,

I've just released a first version of a generic refactoring suite for Vim.
http://code.google.com/p/lh-vim/wiki/lhRefactor

Today the following refactorings are supported:
- extract variable (on v_CTRL-X_v)
- extract type (on v_CTRL-X-t)
- and extract function (on v_CTRL-X_f)

This version mainly focuses on the languages I'm working with on a daily basis, i.e. C++ (and by extension C), and VimL. However, it can be extended quite easily to other languages -- some customizations are also provided for Pascal (I've an interactive extract function), bash and perl. Plenty examples are available in the source code, and in the documentation.


This suite requires the following:
- lh-vim-lib v2.2.0: my library of VimL functions
- and lh-map-tools v1.0.0: my bracketing system, or more precisely the placeholder subsystem.


Future developments are likely to:
- Propose a simple way to use mu-template from a hook, and exchange variables with it.
- Propose other refactorings (I have a few ideas regarding a "move class methods around", "extract interfaces", etc based on the ":Override" feature I've already implemented in lh-cpp).
- Have "extract function" determine automagically the parameters of the extracted function.
- And may be to provide customized hooks for other languages (don't hesitate to participate).

Enjoy, and of course comments are welcomed.

--
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment