最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ubuntu16.04制作vim和python3的開(kāi)發(fā)環(huán)境

 更新時(shí)間:2018年09月23日 11:31:46   作者:鴻鵠安然  
本文給大家介紹的是在ubuntu系統(tǒng)下制作python3開(kāi)發(fā)環(huán)境的詳細(xì)步驟,非常的實(shí)用,有需要的小伙伴可以參考下

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 實(shí)現(xiàn)代碼補(bǔ)全:

#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自動(dòng)折疊插件

    下載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序列:

 進(jìn)入到python腳本所在的目錄,在該目錄下執(zhí)行:
  # ctags -R *
  生成一個(gè) ctags 文件,該文件記錄了程序/項(xiàng)目的函數(shù)、類等的分析序列記錄.

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/.vimrc
filetype off         " required
 
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle
call vundle#begin()
 
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-scripts/indentpython.vim'
Bundle 'Valloric/YouCompleteMe'

" All of your Plugins must be added before the following line
call vundle#end()      " required
filetype plugin indent on  " required

call plug#begin('~/.vim/autoload')
Plug 'Valloric/YouCompleteMe'

call plug#end()

set nocompatible "關(guān)閉與vi的兼容模式
set number "顯示行號(hào)
set nowrap  "不自動(dòng)折行
set showmatch  "顯示匹配的括號(hào)
set scrolloff=3    "距離頂部和底部3行"
set encoding=utf-8 "編碼
set fenc=utf-8   "編碼
"set mouse=a    "啟用鼠標(biāo)
set hlsearch    "搜索高亮
syntax on  "語(yǔ)法高亮
set helplang=cn
set encoding=utf-8

"au BufNewFile,BufRead *.py
set tabstop=4
set softtabstop=4
set shiftwidth=4
set textwidth=79
set expandtab
set autoindent
set fileformat=unix
set foldmethod=indent
set autoindent " 實(shí)現(xiàn)自動(dòng)縮進(jìn)
set foldmethod=indent
set shiftwidth=4
set expandtab
set number

"Flagging Unnecessary Whitespace
highlight BadWhitespace ctermbg=red guibg=darkred

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
filetype plugin on

let g:pydiction_location = '/usr/share/vim/vim74/pydiction/complete-dict' 
let g:pydiction_menu_height = 20
autocmd FileType python set omnifunc=pythoncomplete#Complete


let Tlist_Show_One_File = 1  "不同時(shí)顯示多個(gè)文件的tag,只顯示當(dāng)前文件的    
let Tlist_Exit_OnlyWindow = 1 "如果 taglist 窗口是最后一個(gè)窗口,則退出 vim     
let Tlist_Use_Right_Window = 1 "在右側(cè)窗口中顯示 taglist 窗口   
"let Tlist_Auto_Open=1  "在啟動(dòng) vim 后,自動(dòng)打開(kāi) taglist 窗口
"let Tlist_File_Fold_Auto_Close=1 "只顯示當(dāng)前文件 tag,其它文件的tag折疊 

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
autocmd FileType python set omnifunc=pythoncomplete#Complete

插件安裝:

    切換到命令行模式,依次輸入
    PlugStatus
    PlugInstall
    就可以安裝插件了
    使用vim plug可以方便的管理插件
    查看插件類型:
    :PlugStatus
    安裝插件:
    :PlugInstall
    更新插件::PlugUpdate
    vim-plug本身更新::PlugUpgrade

相關(guān)文章

  • pandas創(chuàng)建DataFrame對(duì)象失敗的解決方法

    pandas創(chuàng)建DataFrame對(duì)象失敗的解決方法

    本文主要介紹了pandas創(chuàng)建DataFrame對(duì)象失敗的解決方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-01-01
  • 使用Python實(shí)現(xiàn)給企業(yè)微信發(fā)送消息功能

    使用Python實(shí)現(xiàn)給企業(yè)微信發(fā)送消息功能

    本文將介紹如何使用python3給企業(yè)微信發(fā)送消息,文中有詳細(xì)的圖文解說(shuō)及代碼示例,對(duì)正在學(xué)習(xí)python的小伙伴很有幫助,需要的朋友可以參考下
    2021-12-12
  • Python實(shí)現(xiàn)返回?cái)?shù)組中第i小元素的方法示例

    Python實(shí)現(xiàn)返回?cái)?shù)組中第i小元素的方法示例

    這篇文章主要介紹了Python實(shí)現(xiàn)返回?cái)?shù)組中第i小元素的方法,結(jié)合實(shí)例形式分析了Python針對(duì)數(shù)組的遍歷、排序、運(yùn)算等相關(guān)操作技巧,需要的朋友可以參考下
    2017-12-12
  • 基于Python實(shí)現(xiàn)視頻分辨率轉(zhuǎn)換

    基于Python實(shí)現(xiàn)視頻分辨率轉(zhuǎn)換

    這篇文章主要介紹了基于Python實(shí)現(xiàn)視頻的分辨率轉(zhuǎn)換的示例代碼,文中的代碼講解詳細(xì),對(duì)學(xué)習(xí)Python有一定的幫助,感興趣的小伙伴可以了解一下
    2021-12-12
  • 探究Python多進(jìn)程編程下線程之間變量的共享問(wèn)題

    探究Python多進(jìn)程編程下線程之間變量的共享問(wèn)題

    這篇文章主要介紹了探究Python多進(jìn)程編程下線程之間變量的共享問(wèn)題,多進(jìn)程編程是Python學(xué)習(xí)進(jìn)階中的重要知識(shí),需要的朋友可以參考下
    2015-05-05
  • python函數(shù)遞歸調(diào)用的實(shí)現(xiàn)

    python函數(shù)遞歸調(diào)用的實(shí)現(xiàn)

    本文主要介紹了python函數(shù)遞歸調(diào)用的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-05-05
  • Python判斷dict中key是否存在的3種方法實(shí)例

    Python判斷dict中key是否存在的3種方法實(shí)例

    大家在學(xué)會(huì)python中的字典,會(huì)發(fā)現(xiàn),字典中是沒(méi)有特殊順序的,但是都存儲(chǔ)在一個(gè)特定的key下面,下面這篇文章主要給大家介紹了關(guān)于Python判斷dict中key是否存在的3種方法,需要的朋友可以參考下
    2022-04-04
  • 詳解基于Scrapy的IP代理池搭建

    詳解基于Scrapy的IP代理池搭建

    這篇文章主要介紹了詳解基于Scrapy的IP代理池搭建,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-09-09
  • Python實(shí)現(xiàn)隨機(jī)生成圖片驗(yàn)證碼詳解

    Python實(shí)現(xiàn)隨機(jī)生成圖片驗(yàn)證碼詳解

    這篇文章主要介紹了如何利用Python生成隨機(jī)的圖片驗(yàn)證碼 并打印驗(yàn)證碼的值,文中的示例代碼簡(jiǎn)潔易懂,感興趣的小伙伴可以跟隨小編一起試試
    2022-01-01
  • 一篇文章詳解json中文編碼問(wèn)題

    一篇文章詳解json中文編碼問(wèn)題

    在使用Flask編寫(xiě)后端接口時(shí),如果設(shè)置的接口返回格式是JSON,可能會(huì)遇到中文編碼問(wèn)題,這篇文章主要介紹了json中文編碼問(wèn)題的相關(guān)資料,需要的朋友可以參考下
    2025-03-03

最新評(píng)論

五大连池市| 屏山县| 托里县| 赣榆县| 定兴县| 桂阳县| 横峰县| 连平县| 罗平县| 昆山市| 枞阳县| 彰化县| 商丘市| 荆门市| 迭部县| 巢湖市| 兴文县| 祁阳县| 滨州市| 简阳市| 乌兰察布市| 广丰县| 延吉市| 虞城县| 光山县| 昭通市| 石嘴山市| 门源| 毕节市| 象州县| 田东县| 布尔津县| 苗栗市| 孝昌县| 年辖:市辖区| 宁都县| 沾化县| 大安市| 洪雅县| 昌图县| 昌宁县|