Python's Ubuntu development environment vim and Ipython

Source: Internet
Author: User

The legend of Ubuntu is to develop the necessary, but also want to try hackers;

ubuntu16.04 comes with python2.7 and 3.5 two versions and Vim editor

One, on-line check a lot of information is the Pydiction plug-in installation use, to achieve tab automatic completion;

sudo apt-get install openssh-server wget tree unzip Ipython-ywget Master.zipunzip-q mastermv pydiction-master pydictionmkdir-p ~/.vim/tools/pydictioncp-r pydiction/after ~/.VIMCP Pydiction/complete-dict ~/.vim/tools/pydiction

Ii. ensure that the structure of the document is as follows:

# tree ~/. Vim/root/. vim├──after│   └──ftplugin│       └──python_pydiction.vim└──tools    └── Pydiction        └──complete-dict

Third, create ~/.VIMRC to ensure that the contents are as follows:

# vim ~/.vimrcfiletype plugin Onlet g:pydiction_location = ' ~/.vim/tools/pydiction/complete-dict '

Iv. automatic completion in Python interactive mode

Create the following file:

# vim ~/.pythonstartup# python startup file#!/usr/bin/env pythonimport sysimport readlineimport rlcompleterimport Atexitimport os# tab completionreadline.parse_and_bind (' Tab:complete ') # History filehistfile = Os.path.join ( os.environ[' HOME '], '. Pythonhistory ') Try:  readline.read_history_file (histfile) except IOError:  Passatexit.register (Readline.write_history_file, Histfile)  del os, Histfile, ReadLine, Rlcompleter1

To add an environment variable:

Echo ' Export Pythonstartup=~/.pythonstartup ' >> ~/.bash_profile

Re-login to the shell, enter the python command into interactive mode, you can use the TAB key to complete the completion.


Python's Ubuntu development environment vim and Ipython

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: 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.