Skip to content

Instantly share code, notes, and snippets.

@rudeb0t
Created July 28, 2012 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rudeb0t/3191848 to your computer and use it in GitHub Desktop.
Save rudeb0t/3191848 to your computer and use it in GitHub Desktop.
Fix ropemode.vim after upgrading to OS X Mountain Lion
" Put this into your ~/.vim/plugins/ as ropemode.vim
" replacing the file if it is already there.
" This fixes loading ropemode after you have installed
" it system-wide. For some reason, the sys.prefix for the
" Python embedded into vim is differently configured from
" the one on system Python.
"
function! LoadRope()
python << EOF
import site
ML_PYTHON_SITE_PACKAGES_PATH = '/Library/Python/2.7/site-packages/'
if ML_PYTHON_SITE_PACKAGES_PATH not in site.getsitepackages():
ADDITIONAL_PATH = site.addsitedir(ML_PYTHON_SITE_PACKAGES_PATH, set())
import ropevim
EOF
endfunction
if has("python")
call LoadRope()
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment