转 Ubuntu 下 vim 搭建python 环境 配置
2017-06-12 07:54
477 查看
1. 安装完整的vim
# apt-get install vim-gnome
2. 安装ctags,ctags用于支持taglist,必需!
# apt-get install ctags
3. 安装taglist
#apt-get install vim-scripts
#apt-get install vim-addon-manager
# vim-addons install taglist
4. 安装pydiction(实现代码补全)
#wget http://www.pythonclub.org/_media/Python-basic/pydiction-1.2.zip
#unzip pydiction-1.2.zip
// ~/.vim/after/ftplugin和~/.vim/tools/pydiction/目录默认不存在,需要自行创建
#cp pydiction-1.2/python_pydiction.vim ~/.vim/after/ftplugin
#cp pydiction-1.2/complete-dict ~/.vim/tools/pydiction/complete-dict
5. 编辑配置文件
//~/.vimrc 修改当前用户配置,如果需要修改全局配置,vim /etc/vim/vimrc
# vim ~/.vimrc
let Tlist_Auto_Highlight_Tag=1 let Tlist_Auto_Open=1 let Tlist_Auto_Update=1 let Tlist_Display_Tag_Scope=1 let Tlist_Exit_OnlyWindow=1 let Tlist_Enable_Dold_Column=1 let Tlist_File_Fold_Auto_Close=1 let Tlist_Show_One_File=1 let Tlist_Use_Right_Window=1 let Tlist_Use_SingleClick=1 nnoremap <silent> <F8> :TlistToggle<CR> filetype plugin on autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS autocmd FileType html set omnifunc=htmlcomplete#CompleteTags autocmd FileType css set omnifunc=csscomplete#CompleteCSS autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags autocmd FileType php set omnifunc=phpcomplete#CompletePHP autocmd FileType c set omnifunc=ccomplete#Complete let g:pydiction_location='~/.vim/tools/pydiction/complete-dict' set autoindent set tabstop=4 set shiftwidth=4 set expandtab set number set lines=35 columns=118
右边即为taglist窗口,按F8打开,使用Ctrl+w,再按w可以在code窗口和taglist窗口间切换
相关文章推荐
- Ubuntu 下 vim 搭建python 环境 配置
- Ubuntu 下 vim 搭建python 环境 配置
- Ubuntu 下 vim 搭建python 环境 配置
- Ubuntu 中vim配置Python开发环境
- 【Ubuntu】Ubuntu16.04配置python环境(vim、ipython)
- Ubuntu Gutsy-配置VIM下面的Python环境_Ubuntu高地_百度空间
- 【深度学习】笔记1_Ubuntu14.04下caffe环境的搭建,无GPU版本以及python可视化环境的配置
- Ubuntu下配置Sublime Text3---python环境的搭建
- ubuntu14.04在Vim上配置Python开发环境
- ubuntu下搭建配置opencv环境(适用于Python和C++)
- 一步步搭建Ubuntu环境——Vim配置 终端背景色配置
- Ubuntu下利用vim搭建python开发环境
- Ubuntu 14.04的vim编辑器配置Python开发环境
- 在ubuntu 上配置vim的php开发环境
- Windows环境下配置Vim为Python的IDE
- python环境搭建和开发工具的配置
- python vim开发环境配置
- Python Qt4 Ubuntu环境搭建
- Python Qt4 Ubuntu环境搭建