Configure vim7 in mac

Source: Internet
Author: User
Today, we have time to configure vim, mainly to configure a comfortable pythonIDE. this configuration adds code completion, keyword highlighting, and code scaling, and file view functions, the main operations are as follows: 1. first, my system's 10.8, the built-in vim configuration file location is as follows:/usr/share/vim/vimrc, this

Today, we have time to configure vim, mainly to configure a comfortable pythonIDE. this configuration adds code completion, keyword highlighting, and code scaling, and file viewing functions, the main operations are as follows:

1. First of all, the vim configuration file of my system 10.8 is located as follows:

/Usr/share/vim/vimrc. this vimrc is our vim configuration file and we copy it to our portal ~ /Directory, run the command cd ~ /Enter the root directory, and then we need to create a local file folder. vim to put our vim plug-in, execute the following command:

Mkdir. vim

Copy the vimrc file to the current directory:

Cp/usr/share/vim/vimrc ~ /.

2. after the execution is complete, we first install the automatic completion plug-in pydiction:

We need to create two folders to prevent pydiction and execute the following command:

Mkdir-p ~ /. Vim/after/ftplugin/(if the folder is created incorrectly during the operation, delete rm-rffilename and copy the folder cp-rf filename destination)

Mkdir-p ~ /. Vim/tools/pydiction/

Put the file python_pydiction.vim ~ /. Vim/after/ftplugin/

Put the complete-dict file ~ /. Vim/tools/pydiction/complete-dict

Cp python_pydiction.vim ~ /. Vim/after/ftplugin/

Cp complete-dict ~ /. Vim/tools/pydiction/complete-dict

Then we need to configure in the. vimrc configuration file, open the configuration file in the current directory vim. vimrc, and put

Filetype plugin on

Let g: pydiction_location = '~ /. Vim/tools/pydiction/complete-dict'

Let g: pydiction_menu_height = 20,

Launch an editor to open a python file. The effect is as follows:

  

This is our automatic complementing function.

3. install the code folding plug-in Efficient python folding;

: Http://www.vim.org/scripts/script.php? Script_id = 1, 1494,

Copy python_editing.vim ~ /. Vim/ftplugin/python,

Then we use vim to open a python file and execute: F in command mode to scale the code. The effect is as follows:

Before scaling:

  

After scaling:

  

4. install the file browser plug-in WinManager:

WinManager official address: http://www.vim.org/scripts/script.php? Script_id = 1, 1440,

After downloading version 2.3, extract the two folders doc and plugin and copy the two folders to the. vim folder. the command is as follows:

Cp-rf plugin ~ /. Vim

Cp-rf doc ~ /. Vim

After the execution is complete, open the python file. in command mode, run: WMToggle to open the plug-in, and switch between the Control-ee command and the other two modules. The effect is as follows:

,

Now we can implement the basic development requirements. there are still many good plug-ins, so sometimes we can get it done, and then we will not go on. I want to use vim to work hard-perseverance and courage!

Vim is worth it!


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.