VimPlugin: RopeVim

From wikinotes

python rope is a library for refactoring python code.
ropevim is a vim interface to this library.

Locations

${PROJECT}/.ropeproject/config.py

Install

# vimrc
Plugin 'https://github.com/python-rope/ropevim.git'

cd ~/.vim/bundle/ropevim/
sudo python2 setup.py install

Configuration

"" Open Vim in your project root, and run
"" :RopeOpenProject
cd $python
vim
RopeOpenProject							"" Follow Prompt to create Rope Project
:q
# /.ropeproject/config.py
prefs['indent_size'] = 3

Usage

Rope has several builtin hotkeys, but I find the commands simpler to remember.

:RopeOpenProject  "start ropevim, open ropeproject in current dir

<C-x> p o     "(<prefix> (p)roject (o)pen)         create/open rope project
<C-x> p u/r   "(<prefix> (p)roject (u)ndo(r)edo)    undo/redo refactoring
<C-c> r a d   "doctag under cursor
<C-c> r r     "rename class/variable/... 
<C-c> r 1 r   "rename module
<C-c> r a f   "find occurrences (may be useful... )
<C-c> r a g   "goto a function definition (for when ctags lets me down)