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
    #Ubuntu下行使vim搭建python开发条件。 vim-addons install taglist

  4. 设置pydiction(落成代码补全)
    #wget

    #unzip pydiction-1.2.zip

转 Ubuntu 下 vim 搭建python 环境 配置,ubuntuvim

  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

    #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

  1. 编辑配置文件
    //~/.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 :TlistToggle

    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 环境 配置,ubuntuvim

  1. 设置完整的vim # apt-get install vim-gnome 2.
    装置ctags,ctags用于支持taglist,必需! # apt-get install…
  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

    #unzip pydiction-1.2.zip

1. 安装vim

//
~/.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

//
~/.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

$ sudo apt-get install vim

  1. 编写制定配置文件
    //~/.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 :TlistToggle

    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

  1. 编写制定配置文件
    //~/.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 :TlistToggle

    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

2. 设置ctags,ctags用于支持taglist,必需!

左边即为taglist窗口,按F8打开,使用Ctrl+w,再按w能够在code窗口和taglist窗口间切换

左侧即为taglist窗口,按F8打开,使用Ctrl+w,再按w可以在code窗口和taglist窗口间切换

$ sudo apt-get install ctags

3. 安装taglist

$ sudo apt-get install vim-scripts

$ sudo apt-get install vim-addon-manager

$ sudo vim-addons install taglist

4. 装置pydiction(完结代码补全)

$ sudo wget

$ sudo unzip pydiction-1.2.zip

// ~/.vim/after/和~/.vim/tools/pydiction/目录私下认可不存在,需求活动成立

$ sudo mkdir -p ~/.vim/after/                //创制目录~/.vim/after/ 

$ sudo mkdir -p ~/.vim/tools/pydiction/            
//创制目录~/.vim/tools/pydiction/

$ sudo cp pydiction-1.2/python_pydiction.vim ~/.vim/after/ftplugin

$ sudo cp pydiction-1.2/complete-dict
~/.vim/tools/pydiction/complete-dict

  • *5. 编辑配置文件

$ sudo vim ~/.vimrc

 1 let Tlist_Auto_Highlight_Tag=1   
 2 let Tlist_Auto_Open=1   
 3 let Tlist_Auto_Update=1   
 4 let Tlist_Display_Tag_Scope=1   
 5 let Tlist_Exit_OnlyWindow=1   
 6 let Tlist_Enable_Dold_Column=1   
 7 let Tlist_File_Fold_Auto_Close=1   
 8 let Tlist_Show_One_File=1   
 9 let Tlist_Use_Right_Window=1   
10 let Tlist_Use_SingleClick=1   
11 nnoremap <silent> <F8> :TlistToggle<CR>  // 设定F8为taglist开关  
12      
13 filetype plugin on   
14 autocmd FileType python set omnifunc=pythoncomplete#Complete   
15 autocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS   
16 autocmd FileType html set omnifunc=htmlcomplete#CompleteTags   
17 autocmd FileType css set omnifunc=csscomplete#CompleteCSS   
18 autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags   
19 autocmd FileType php set omnifunc=phpcomplete#CompletePHP   
20 autocmd FileType c set omnifunc=ccomplete#Complete   
21      
22      
23 let g:pydiction_location='~/.vim/tools/pydiction/complete-dict'   
24 set autoindent // 实现自动缩进  
25 set tabstop=4   
26 set shiftwidth=4   
27 set expandtab   
28 set number  

时至后天,马到成功!来张实现图:

澳门金沙国际 1

出手即为taglist窗口,按F8打开或关闭,使用Ctrl+w,再按w能够在code窗口和taglist窗口间切换。

 

相关文章