Configuring GVIM8 as a Python IDE under Windows

Source: Internet
Author: User
Tags file copy

Configuring Gvim as a Python IDE under Windows

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:\Program files\python27, add this path to the environment variable;

2) Install Gvim, I installed to the D:\Program files (x86) \vim, the path D:\Program files (x86) \VIM\VIM80 add to the environment variable;

3) Install ctags, download files after extracting Ctags.exe files in the file to D:\Program files (x86) \vim\vim80 path;

4) Install the taglist, download the file after extracting the plugin file Taglist.vim file copy to D:\Program files (x86) \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:\Program file ( x86) under \vim\vim80\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? ") " )2print"+name+"!

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

The use of ctags,taglist,pydiction will be described in another essay.

Configuring GVIM8 as a 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.