
Vim For Mac High Sierra
Vim articles My vim related articles • • • • Install vim from source code Using git to clone the source code and change directory to vim/src, build the source code using make and then install it into /usr/local/bin. ~ $ git clone ~ $ cd vim/src ~ $ sudo make ~ $ sudo make install After above, restart the terminal, run below commands to verify the installation. ~ $ vim --version Output will be something like below VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 24 2018 14:10:16) macOS version Included patches: 1-1428 Compiled by xxxx@xxx.local Huge version without GUI. Features included (+) or not (-): +extra_search +mouse_netterm +tag_old_static system vimrc file: '$VIM/vimrc' user vimrc file: '$HOME/.vimrc' 2nd user vimrc file: '~/.vim/vimrc' user exrc file: '$HOME/.exrc' defaults file: '$VIMRUNTIME/defaults.vim' fall-back for $VIM: '/usr/local/share/vim' Compilation: gcc -c -I. Disk is set up for a mac on windows.
-Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv -lintl -framework AppKit Check the vim installation path ~ $ which vim /usr/local/bin/vim Add python support Download and install python from If you want to add python and python3 support, then the./configure must be properly applied. Run command cd vim./configure --enable-multibyte --enable-perlinterp=dynamic --enable-rubyinterp=dynamic --with-ruby-command=/usr/local/bin/ruby --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-cscope --enable-gui=auto --with-features=huge --with-x --enable-fontset --enable-largefile --disable-netbeans --with-compiledby='shizhen.chn@email.com' --enable-fail-if-missing Option –enable-fail-if-missing is to see the errors for configuration and stop the configuration immediately. By running above build configuration command, you will see something like below, and the lines with “ python” and “ python3” are about your python configuration where you can know whether your python paths are correctly configured. Configure: creating cache auto/config.cache checking whether make sets $(MAKE). Yes checking for gcc. Checking --enable-pythoninterp argument.
Dynamic checking --with-python-command argument. No checking for python2. No checking for python. /usr/bin/python checking Python version.
Nov 25, 2017 - If you had Vim already installed with Homebrew (or if in the future. Is an open-source, actively maintained package manager for Mac OS X. Nov 10, 2017 - (did not try installing from source, didn't want to 'own' my macvim at that. This did work: brew uninstall --purge macvim brew install macvim.
2.7 checking Python is 2.3 or better. Yep checking Python's install prefix. /System/Library/Frameworks/Python.framework/Versions/2.7 checking Python's execution prefix. /System/Library/Frameworks/Python.framework/Versions/2.7 checking Python's configuration directory.
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config checking Python's dll name. Python.framework/Versions/2.7/Python checking if -pthread should be used. No checking if compile and link flags for Python are sane. Yes checking --enable-python3interp argument. Dynamic checking --with-python3-command argument.
No checking for python3. /usr/local/bin/python3 checking Python version. 3.6 checking Python is 3.0 or better. Yep checking Python's abiflags.
M checking Python's install prefix. /usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6 checking Python's execution prefix. /usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6 checking Python's configuration directory. /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin checking Python3's dll name. Configure: updating cache auto/config.cache configure: creating auto/config.status config.status: creating auto/config.mk config.status: creating auto/config.h Then run sudo make && make install to install vim. Verify your python is enabled by running command vim --version. You should be able to see +python/dyn and +python3/dyn which means python are enabled.