Configure Gvim to Python ide[under Windows)

Source: Internet
Author: User
Tags file copy

Body

Configuring Gvim as a Python IDE under Windows

Back to top 1. Preparatory work

Download the following installation package or file.

1) Python 2.7 Http://www.python.org/ftp/python/2.7.2/python-2.7.2.msi

2) gvim8.0 http://www.vim.org/download.php

3) Exuberant Ctags http://ctags.sourceforge.net/

4) Taglist http://www.vim.org/scripts/script.php?script_id=273

5) Pydiction http://www.vim.org/scripts/script.php?script_id=850

2. Installation

1) Install Python2.7, I installed to the D:\APP\Python27, add this path to the environment variable;

2) Install Gvim, I installed to the D:\APP\Vim, add the path D:\APP\Vim\vim80 to the environment variable;

3) Install ctags, download the file after extracting the file Ctags.exe file copy to D:\APP\Vim\vim80 path;

4) Install taglist, download the file after extracting the plugin file Taglist.vim file copy to the D:\APP\Vim\vim80\plugin path;

5) Install pydiction, download the file after extracting complete-dict,pydiction and After\ftplugin path Python_pydiction.vim these three files copied to D:\APP\Vim\vim80\ The Ftplugin path.

3. Configure _VIMRC

This file of mine is under D:\Program files (x86) \vim path.

Open the file _VIMRC and add the following statement at the end (the Kanji section is not added):

Let tlist_ctags_cmd= ' Ctags.exe ' (note: If Ctags.exe is not placed in the file described in step 2nd, the complete path is given here)
Let Tlist_auto_open=1
Let g:pydiction_location = ' D:\Program Files (x86) \vim\vim80\ftplugin\complete-dict ' (Note: Your own Vim path in single quotes)
Let G:pydiction_menu_height = 20

Map <f12>:!python.exe% (This statement is used to set the compiler shortcut key, when the program is completed, press F12)

4. Writing and compiling the running program

Write the following code

1 name = Raw_input ("What ' s your name?") 2 print "Hello", "+name+"!

After saving, press F12 and enter to complete the program compile and run, such as:

Configure Gvim to Python ide[under Windows)

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.