Created
July 28, 2012 04:52
-
-
Save rudeb0t/3191848 to your computer and use it in GitHub Desktop.
Fix ropemode.vim after upgrading to OS X Mountain Lion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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