Any pointers on using Ropevim? Is it a usable library?
Asked Answered
S

4

30

Rope is a refactoring library for Python and RopeVim is a Vim plugin which calls into Rope.

The idea of using RopeVim seems great to me, is there any documentation on "getting started" with RopeVim?

I've followed what documentation there is: https://bitbucket.org/agr/ropevim/src/tip/README.txt

I suppose I'm looking for:

  • look at this blog post / article / link it makes it all make sense.
  • alternate recommendations like "forget about RopeVim", it doesn't work very well or say "use this instead of ropevim".
Saloma answered 30/1, 2011 at 14:47 Comment(0)
T
2

The documentation you found only shows the Vim particulars. If you want to see what those rope functions can do, see the rope documentation. Note, it's incomplete and points to the unittests for a full overview of what it can do.

Too answered 16/5, 2011 at 16:16 Comment(0)
G
13

For basic renaming, hover your vim cursor over the variable/method/etc that you wish to rename and then type:

:RopeRename <enter>

From there it should be self-explanatory. It asks for the root path to the project you wish to do the renaming in. Then it asks you for the new name. Then you can preview/confirm changes.

If you have tab-complete setup in your vim command-area you can look through the other rope features by typing:

:Rope<Tab>
Grith answered 22/9, 2011 at 3:48 Comment(0)
A
2

i use this script and is the best to automate all the process

https://gist.github.com/15067

#!/bin/bash

# Plant rope vim's plugin
# This is a script to install or update 'ropevim'
# Copyright Alexander Artemenko, 2008
# Contact me at svetlyak.40wt at gmail com

function create_dirs
{
    mkdir -p src
    mkdir -p pylibs
}

function check_vim
{
    if vim --version | grep '\-python' > /dev/null
    then
echo You vim does not support python plugins.
        echo Please, install vim with python support.
        echo On debian or ubuntu you can do this:
        echo " sudo apt-get install vim-python"
        exit 1
    fi
}

function get_or_update
{
    if [ -e $1 ]
    then
cd $1
        echo Pulling updates from $2
        hg pull > /dev/null
        cd ..
    else
echo Cloning $2
        hg clone $2 $1 > /dev/null
    fi
}

function pull_sources
{
    cd src
    get_or_update rope http://bitbucket.org/agr/rope
    get_or_update ropevim http://bitbucket.org/agr/ropevim
    get_or_update ropemode http://bitbucket.org/agr/ropemode

    cd ../pylibs
    ln -f -s ../src/rope/rope
    ln -f -s ../src/ropemode/ropemode
    ln -f -s ../src/ropevim/ropevim.py
    cd ..
}

function gen_vim_config
{
    echo "let \$PYTHONPATH .= \":`pwd`/pylibs\"" > rope.vim
    echo "source `pwd`/src/ropevim/ropevim.vim" >> rope.vim
    echo "Now, just add \"source `pwd`/rope.vim\" to your .vimrc"
}

check_vim
create_dirs
pull_sources
gen_vim_config
Anabolite answered 22/2, 2011 at 18:41 Comment(2)
Although your script is useful, this does not answer the questions asked above. This should have been a comment.Lassalle
I call bullshit. This is a great example of 'documentation on "getting started" with RopeVim'Rene
T
2

The documentation you found only shows the Vim particulars. If you want to see what those rope functions can do, see the rope documentation. Note, it's incomplete and points to the unittests for a full overview of what it can do.

Too answered 16/5, 2011 at 16:16 Comment(0)
S
-4

If you can live without vim, use Eric, which has rope support.

Saimon answered 1/2, 2011 at 17:10 Comment(3)
This does not answer the OP's question.Inhabiter
@Inhabiter yes it does. "Use this instead of RopeVim"Saimon
For as much as it sounds fun to enter a decades long debate :P I think the rating here speaks to how helpful this type of answer is.Inhabiter

© 2022 - 2024 — McMap. All rights reserved.