国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

ubuntu16.04制作vim和python3的開發環境

2020-02-15 23:02:14
字體:
來源:轉載
供稿:網友

1. 安裝vim:

# apt-get install  -y vim-gnome

2. 安裝ctags,ctags用于支持taglist

# apt-get install ctags

3. 安裝taglist

# apt-get install vim-scripts vim-addon-manager
# vim-addons install taglist

4. 安裝pydiction 實現代碼補全:

#wget  https://www.vim.org/scripts/script.php?script_id=850/pydiction-1.2.3.zip
# unzip pydiction-1.2.3.zip
# cd pydiction/after/ftplugin/
# mkdir /usr/share/vim/vim74/pydiction
# cp  -rp python_pydiction.vim  /usr/share/vim/vim74/ftplugin/
# cp complete-dict pydiction.py  /usr/share/vim/vim74/pydiction/

5.安裝python_fold自動折疊插件

    下載python_fold.vim:
 https://www.vim.org/scripts/script.php?script_id=515
 
 # mv python_fold.vim /usr/share/vim/vim74/plugin/
 
  #vim /root/.vimrc
 set foldmethod=indent

6. 生成ctag序列:

 進入到python腳本所在的目錄,在該目錄下執行:
  # ctags -R *
  生成一個 ctags 文件,該文件記錄了程序/項目的函數、類等的分析序列記錄.

7. 安裝taglist插件:

 下載插件:
  https://www.vim.org/scripts/script.php?script_id=273
 # unzip taglist_46.zip
 # cp plugin/taglist.vim  /usr/share/vim/vim74/plugin/
 # cp doc/taglist.txt  /usr/share/vim/vim74/doc/
 #vim
 :helptags /usr/share/vim/vim74/doc        "生成taglist幫助文件列表。
 : help taglist.txt        “查看taglist幫助信息。

8. 安裝vim  plug:

 # mkdir ~/.vim/autoload/
 # cd ~/.vim/autoload/
 # wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

 配置vim plug:

 #vim /root/.vimrc call plug#begin('~/.vim/autoload')           Plug 'Valloric/YouCompleteMe'              call plug#end() #vim /root/.vimrcfiletype off         " required " set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/vundlecall vundle#begin() " let Vundle manage Vundle, requiredPlugin 'VundleVim/Vundle.vim'Plugin 'vim-scripts/indentpython.vim'Bundle 'Valloric/YouCompleteMe'" All of your Plugins must be added before the following linecall vundle#end()      " requiredfiletype plugin indent on  " requiredcall plug#begin('~/.vim/autoload')Plug 'Valloric/YouCompleteMe'call plug#end()set nocompatible "關閉與vi的兼容模式set number "顯示行號set nowrap  "不自動折行set showmatch  "顯示匹配的括號set scrolloff=3    "距離頂部和底部3行"set encoding=utf-8 "編碼set fenc=utf-8   "編碼"set mouse=a    "啟用鼠標set hlsearch    "搜索高亮syntax on  "語法高亮set helplang=cnset encoding=utf-8"au BufNewFile,BufRead *.pyset tabstop=4set softtabstop=4set shiftwidth=4set textwidth=79set expandtabset autoindentset fileformat=unixset foldmethod=indentset autoindent " 實現自動縮進set foldmethod=indentset shiftwidth=4set expandtabset number"Flagging Unnecessary Whitespacehighlight BadWhitespace ctermbg=red guibg=darkredlet 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=1filetype plugin onlet g:pydiction_location = '/usr/share/vim/vim74/pydiction/complete-dict' let g:pydiction_menu_height = 20autocmd FileType python set omnifunc=pythoncomplete#Completelet Tlist_Show_One_File = 1  "不同時顯示多個文件的tag,只顯示當前文件的    let Tlist_Exit_OnlyWindow = 1 "如果 taglist 窗口是最后一個窗口,則退出 vim     let Tlist_Use_Right_Window = 1 "在右側窗口中顯示 taglist 窗口   "let Tlist_Auto_Open=1  "在啟動 vim 后,自動打開 taglist 窗口"let Tlist_File_Fold_Auto_Close=1 "只顯示當前文件 tag,其它文件的tag折疊 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#Completeautocmd FileType python set omnifunc=pythoncomplete#Complete            
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 巴塘县| 东阿县| 民乐县| 芦山县| 桂林市| 嘉义市| 大港区| 筠连县| 靖边县| 云安县| 津南区| 怀化市| 翁牛特旗| 上饶市| 壤塘县| 外汇| 收藏| 大方县| 灌阳县| 韶山市| 贡嘎县| 滨州市| 两当县| 绥棱县| 新郑市| 油尖旺区| 弥渡县| 山东省| 荔波县| 乐都县| 和田市| 交口县| 新化县| 景德镇市| 仁化县| 邹城市| 开化县| 鄂尔多斯市| 新源县| 西丰县| 双鸭山市|