Skip to content

Commit

Permalink
Added ropevim
Browse files Browse the repository at this point in the history
  • Loading branch information
garybernhardt committed Oct 6, 2009
1 parent 30c068c commit 23efff5
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .vim/ropevim/install.sh
@@ -0,0 +1,64 @@
#!/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
1 change: 1 addition & 0 deletions .vim/ropevim/pylibs/rope
1 change: 1 addition & 0 deletions .vim/ropevim/pylibs/ropemode
1 change: 1 addition & 0 deletions .vim/ropevim/pylibs/ropevim.py
Binary file added .vim/ropevim/pylibs/ropevim.pyc
Binary file not shown.
2 changes: 2 additions & 0 deletions .vim/ropevim/rope.vim
@@ -0,0 +1,2 @@
let $PYTHONPATH .= ":/Users/grb/.vim/ropevim/pylibs"
source /Users/grb/.vim/ropevim/src/ropevim/ropevim.vim
3 changes: 3 additions & 0 deletions .vimrc
Expand Up @@ -332,3 +332,6 @@ autocmd FileType htmldjango source ~/.vim/indent/html_grb.vim
" Map ,e to open files in the same directory as the current file
map <leader>e :e <C-R>=expand("%:h")<cr>/
if has("python")
source ~/.vim/ropevim/rope.vim
endif

0 comments on commit 23efff5

Please sign in to comment.