关于使用 Ropevim 有什么建议吗?它是一个可用的库吗?

发布于 2024-10-15 03:38:36 字数 415 浏览 2 评论 0原文

Rope 是 Python 的重构库,RopeVim 是调用 Rope 的 Vim 插件。

使用 RopeVim 的想法对我来说似乎很棒,有任何关于 RopeVim“入门”的文档吗?

我已经遵循了其中的文档:https://bitbucket.org/agr/ropevim/src/tip/README.txt

我假设我正在寻找:

  • 看看这篇博客文章/文章 / 链接让这一切都有意义。
  • 替代建议,例如 “忘记 RopeVim”,它不会 工作得很好或者说“用这个 而不是ropevim”。

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".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

戴着白色围巾的女孩 2024-10-22 03:38:36

对于基本的重命名,将 vim 光标悬停在要重命名的变量/方法/等上,然后键入:

:RopeRename <enter>

从那里它应该是不言自明的。它会询问您想要重命名的项目的根路径。然后它会询问您新名称。然后您可以预览/确认更改。

如果您在 vim 命令区域中进行了 tab-complete 设置,您可以通过键入以下内容来查看其他绳索功能:

:Rope<Tab>

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>
离鸿 2024-10-22 03:38:36

您找到的文档仅显示了 Vim 的详细信息。如果您想了解这些绳索函数的功能,请参阅绳索文档。请注意,它并不完整,并指向单元测试以全面了解它的功能。

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.

深爱成瘾 2024-10-22 03:38:36

我使用这个脚本,最好自动化所有过程

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

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
楠木可依 2024-10-22 03:38:36

如果你可以不用 vim,请使用 Eric,它有绳索支持。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文