osx - Python and Homebrew Vim -


on mac, use macvim homebrew of editing.

~|⇒ vim --version vim - vi improved 7.3 (2010 aug 15, compiled jun 20 2012 13:16:02) compiled root@apple.com normal version without gui.  features included (+) or not (-): -arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments -conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn -python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title  -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -x11 -xfontset -xim -xsmp  -xterm_clipboard -xterm_save    system vimrc file: "$vim/vimrc"      user vimrc file: "$home/.vimrc"       user exrc file: "$home/.exrc"   fall-back $vim: "/usr/share/vim" compilation: gcc -c -i. -d_fortify_source=0 -iproto -dhave_config_h -arch i386 -arch x86_64 -g -os -pipe linking: gcc -arch i386 -arch x86_64 -o vim -lncurses 

however, on last few days, having weird problem. when start vim command line, following message , vim crashes.

~|⇒ vim test.txt traceback (most recent call last):   file "/usr/local/lib/python2.7/site-packages/site.py", line 74, in <module>     __boot()   file "/usr/local/lib/python2.7/site-packages/site.py", line 34, in __boot     imp.load_module('site',stream,path,descr)   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 563, in <module>     main()   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 545, in main     known_paths = addusersitepackages(known_paths)   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 278, in addusersitepackages     user_site = getusersitepackages()   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 253, in getusersitepackages     user_base = getuserbase() # set user_base   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/site.py", line 243, in getuserbase     user_base = get_config_var('userbase')   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/sysconfig.py", line 472, in get_config_var     return get_config_vars().get(name)   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/sysconfig.py", line 405, in get_config_vars     import re   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/re.py", line 105, in <module>     import sre_compile   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/sre_compile.py", line 14, in <module>     import sre_parse   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/sre_parse.py", line 17, in <module>     sre_constants import *   file "/usr/local/cellar/python/2.7.4/frameworks/python.framework/versions/2.7/lib/python2.7/sre_constants.py", line 18, in <module>     _sre import maxrepeat importerror: cannot import name maxrepeat 

but when start using icon in applications menu, starts fine. tried variants on this, example if open applications/macvim, runs perfectly. far understand it, goes wrong python when start vim command line.

could tell me going wrong here , how fix it. can find vimrc files here.

no. thing not vim or macvim installed homebrew: default vim comes mac os x.

the default vim has been sucking in number of ways quite long time, chiefly -xterm-clipboard, , that's main reason why people install "proper" vim. installing macvim doesn't replace default vim @ must small bit of tinkering make vim command execute macvim's bundled cli executable:

  1. place mvim script somewhere in $path.

  2. add line below shell's *rc:

    alias vim='mvim -v' 

but use homebrew , have no idea if mvim script or if installed @ all.

if want use homebrew's vim/macvim in shell have 2 solutions.

  • make sure vim command points fancy vim. can done in multitude of ways: 1 way add directory vim installed beginning of $path, way create alias in shell's *rc file.

  • reinstall vim or macvim via homebrew override-system-vi option.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -