Vim's Python editor detailed configuration process (Based on Ubuntu 12.04 LTS)

Source: Internet
Author: User
Tags command line zip linux

Why should I use vim to edit the py file?

Because Ide,vim is the best text editor in the Linux command line, the lack of a graphical interface configures vim for better editing of the py text.

1. Install the full version of Vim

What is the difference between VI and VIM?

In Linux with the VI editor, and VIM is the VI improved, that is, vi upgrade version. The difference is that VI instructions and functions more simple than vim, is because of this only VI improved.

Ubuntu's own VI editor is Vim.tiny, which is the most basic function of vim, almost equal to VI. In Ubuntu, the VI command points to vim.

How to use apt to install vim?

The Linux branch of Debian and its derivative versions can be managed via apt Management Pack, APT is the abbreviation of Advanced packaging tools. As a Debian branch, Ubuntu is handy for managing packages with apt commands.

When you install a package using the Apt-get command, you will find several packages to choose from: Vim,vim-gnome,vim-gtk,vim-tiny. It is said that vim package is actually vim.basic, this version does not support GUI. The recommended installation is vim-gnome.

APT Search package:

$ Apt-cache Search Package_name

APT installation package:

$ apt-get Install Vim-gnome

When the installation is complete, the VI command points to vim.gnome.

2. Install Ctags

Ctags is used to support taglist, and ctags can be used to jump between variables.

$ apt-get Install Ctags

3. Install TagList

First install vim-scripts,vim-scripts with Vim-addon-manager,vim-addon-manager is one of the many plugins managers in Ubuntu to manage the Vim plug-in. Install TagList through Vim-addon-manager.

$ apt-get Install vim-scripts
$ vim-addons Install TagList

4. Install Pydiction

Pydiction is used to implement code completion and syntax hints. Pydiction can not be installed through apt, you need to download the installation.

Download method One:

Download the zip Package at Vim's website and unzip it yourself. Download the address: http://www.vim.org/scripts/script.php? script_id=850

Download Method Two:

In the GitHub download source code, you can use Git to move out to the local, or download the zip package on its own decompression, address: https://github.com/rkulla/pydiction

Pydiction allows vim to automatically complement all Python code, whether it's a keyword, a standard library, or a third-party library. It consists mainly of 3 files:

Python_pydiction.vim:vim plug-in file.

Complete-dict: A dictionary file that contains the keywords and modules of Python. This is what the plug-in refers to.

pydiction.py: A PY script that runs this file to add new modules to the Complete-dict dictionary.

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.