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.