Switch to vim in Ubuntu to set up the python environment configuration, Ubuntu vim

Source: Internet
Author: User

Switch to vim in Ubuntu to set up the python environment configuration, Ubuntu vim

1. Install complete vim
# Apt-get install vim-gnome

2. Install ctags. ctags are used to support taglist. required!
# Apt-get install ctags

3. Install taglist
# Apt-get install vim-scripts
# Apt-get install vim-addon-manager
# Vim-addons install taglist

4. Install pydiction (Code Completion)
# Wget http://www.pythonclub.org/_media/Python-basic/pydiction-1.2.zip
# Unzip pydiction-1.2.zip

//~ /. Vim/after/ftplugin and ~ /. Vim/tools/pydiction/directory does not exist by default. You must create a directory by yourself.
# Cp pydiction-1.2/python_pydiction.vim ~ /. Vim/after/ftplugin
# Cp pydiction-1.2/complete-dict ~ /. Vim/tools/pydiction/complete-dict

5. Edit the configuration file
//~ /. Vimrc modify the current user configuration. If you need to modify the global configuration, vim/etc/vim/vimrc
# Vim ~ /. Vimrc

let Tlist_Auto_Highlight_Tag=1let Tlist_Auto_Open=1let Tlist_Auto_Update=1let Tlist_Display_Tag_Scope=1let Tlist_Exit_OnlyWindow=1let Tlist_Enable_Dold_Column=1let Tlist_File_Fold_Auto_Close=1let Tlist_Show_One_File=1let Tlist_Use_Right_Window=1let Tlist_Use_SingleClick=1nnoremap <silent> <F8> :TlistToggle<CR>filetype plugin onautocmd FileType python set omnifunc=pythoncomplete#Completeautocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJSautocmd FileType html set omnifunc=htmlcomplete#CompleteTagsautocmd FileType css set omnifunc=csscomplete#CompleteCSSautocmd FileType xml set omnifunc=xmlcomplete#CompleteTagsautocmd FileType php set omnifunc=phpcomplete#CompletePHPautocmd FileType c set omnifunc=ccomplete#Completelet g:pydiction_location='~/.vim/tools/pydiction/complete-dict'set autoindentset tabstop=4set shiftwidth=4set expandtabset numberset lines=35 columns=118

Click the taglist window on the right, press F8 to open the window, press Ctrl + w, and then press w to switch between the code window and taglist window.

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.