Install VIM 7.4 notes under Mac OS X Yosemite (10.10.5)

Source: Internet
Author: User
Tags lua sublime text enthought canopy



Summary


    1. Objective
    2. Requirements clash with Mac OS X's own vim version
    3. Default Python interpreter problem
      1. Not a Mac comes with Python
    4. Homebrew


1. Preface



This article is a record of my own death toss.



2. Conflict between demand and Mac OS X's own vim version



-Why use Vim



Emacs because there are no other reasons for Emacs left a very bad memory, now is not necessary, do not want to learn (_ (: З"∠) _), Sublime Text 2/3 in the Build Python program, the console, the output is prone to problems, Hope to be settled under the terminal. In addition Matplotpy and other libraries in the sublime text is also an old problem. Pycharm used only once, as a daily need python to write a variety of short program slag, can not understand pycharm dazzling graphical interface.



-Why Vim 7.4 does not bring your own VIM 7.3



Usually for a long time in the Linux code without GUI, using VIM, use their own computer often with terminal, sometimes hand lazy do not want to open the IDE



Common language: C,python 2.7



Not how to configure vim and eager to use, found a good plug-in: Spf13



Results follow the guidance down to find unable to open Python file, spf13 on GitHub issue, only a small number of replies to this question



Carefully read the Readme, decided to prioritize the settlement of Neocomplete's pit [1]



3. Default Python interpreter problem



Need to change the Python interpreter to a python.org release (why not change it for a minute)



Enthought Canopy Python became the default,/usr/<current_user>/.profile do not want to enthought canoy environment to get rid of, tried several times unsuccessful, and finally use the Bash command DAFA [2]


$ export PYTHONPATH=/path/to/dir:$PYTHONPATH #enter under the terminal, and then remember not to exit the terminal, and directly brew install



4. Homebrew



Mac under homebrew installation omitted. Under the Mac vim compiles the installation, finally still needs the Python.h file, not to open this pit.



What you need to do is:



$ brew Install python #python 2.7.11



$ Brew Install Ruby



$ brew Install LUA # Note is not compiled to install LUA 5.3, unified with brew to do instead the most convenient



$ brew install-v vim--with-lua--with-python--with-ruby--with-perl #-v, verbose






A little off-topic:



About Debian/ubuntu apt-get: using sudo apt-get install LUA in other environments, when writing C programs want to include header files, error, in Apt-get need to install additional packages, in the brew one step.



About Package management tools:



In the configuration of a variety of wonderful environment, as well as the process of vim, gradually do not like apt-get (purely subjective). A separate record of the text.






Attached: Configuration of the Vim process, considered to be more useful plug-ins:



Vundle: http://www.wklken.me/posts/2015/06/07/vim-plugin-vundle.html



Pydiction: This vundle or just let spf13 install the script to run automatically.



Annex II: Homebrew



Brew on Linux:



Linuxbrew:homebrew for Linux






End:



Restart terminal, successfully installed Vim 7.4, using plug-in currently can not be any problem (as a novice), successfully opened the. py file, and the original system default Python interpreter did not change (not brew, back to the original.) The premise is that your Python is not installed in the default path and is set in ~/.profile.



Theme is solarized



Summary: Not familiar with vim, all kinds of package management tools are in use, are not familiar, very messy; the management of the various versions of Python in his own system is not very messy (especially in several versions of Python that were previously compiled)



About Emacs: In fact, Emacs is a very good system.






Note:



[1] Https://github.com/spf13/spf13-vim:readme reference to Neocomplete and the LUA problem in vim



[2] Http://stackoverflow.com/questions/3387695/add-to-python-path-mac-os-x





Resources:



Install Vim7.4 in Mac



Https://github.com/Shougo/neocomplete.vim












Install VIM 7.4 notes under Mac OS X Yosemite (10.10.5)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.