RopeVim — refactoring tool for Python and Vim

Published at 06, October 2008, author art. Tags: my-projects, python, refactoring, tools, vim

Today I found an interesting project "rope". It is a python library for refactoring python code. Also, it has frontends for vim and emacs. As I am active user of the vim, I wrote a simple script, to simplify installation and update of the ropevim. To try ropevim, you need a Vim with support for python plugins and mercurial, to fetch sources of the rope from repository. If you work under Linux Ubuntu, like me, then you need to do few simple commands, to install the ropevim:

  • First, install the mercurial and vim-python: sudo apt-get install mercurial vim-python.
  • Next, create a directory anywhere in your home directory and download my installation script into that directory.
  • Make script executable and run it.
  • Add one line into your _.vimrc_ to _source_ autogenerated configuration file.

That's it! Enjoy python refactoring with vim and rope. And don't forget to read a ropevim manual with default keybindings.

Pingbacks

permalink

08, May 2009, pingback from http://talkingincircles.net/2009/05/0...:

There you have it! Rope has lots more features, so be sure to read the readme. Thanks to Alexander Artemenko for the easy-to-use script.

Comments

Subscribe on this post's comments

permalink

25, February 2009, owner of http://zjesse.blogspot.com/ said:

dear alexander, why is your bash script extracted from the tarball using dos-style newlines? i've fixed that though

permalink

25, February 2009, art said:

Thanks, already fixed.

permalink

26, February 2009, owner of http://zjesse.blogspot.com/ said:

dear alexander, your new commit broke the old code by omitting the pound sign of the shebang...

permalink

02, March 2009, art said:

Well, I fix it, but I can't to upload my file to gist with unix-style newlines! It converts them to dos-style :-(

permalink

29, June 2009, owner of https://me.yahoo.com/a/VBF.... said:

Hi Alex,

your install script proved very useful to me - the ropevim instructions left me a little confused.

I did have a problem with the PYTHONPATH setting in the rope.vim the script creates; I changed it to this:

"let $PYTHONPATH .= ":/path/to/install/ropevim/pylibs"

python import sys; sys.path.append("/path/to/install/ropevim/pylibs"); del sys

source /path/to/install/ropevim/ropevim.vim

If anybody else gets stuck maybe they will find this useful.

permalink

27, August 2009, weakish said:

If you work under Linux Ubuntu, like me, than you need to do few simple commands, to install the ropevim:

Note: Should be "then"?

permalink

27, August 2009, art said:

Yes, thanks.

permalink

27, February 2010, owner of http://mdwhatcott.blogspot.... said:

Thanks a bunch - this is just what I was looking for!

If you wish to leave comment, please, identify yourself and then come back to this page.