為內建的 Vim 編輯器安裝 python-mode 外掛

編輯檔案 ~/.vimrc

  • 使用 Vundle 管理 Vim 外掛
  • 安裝 Vim 外掛 klen/python-mode
  • 關閉 Vim 外掛 klen/python-mode 的 rope 功能

下載 Vundle

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

設定 Vundle

" enable syntaxt highlighting
syntax on

" settings of plugin vundle
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" let Vundle manage other plugins
Plugin 'klen/python-mode'
Plugin 'pydiction'
Plugin 'AutoComplPop'

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

" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

" settings of plugin pymode
let g:pymode_rope = 0

" settings of plugin pydiction
let g:pydiction_location = '/Users/cclin/.vim/bundle/pydiction/complete-dict'
hi Pmenu           ctermfg=green  ctermbg=white guifg=#66D9EF  guibg=#000000
hi PmenuSel        ctermfg=green  ctermbg=blue                 guibg=#808080
hi PmenuSbar                                                   guibg=#080808
hi PmenuThumb                                   guifg=#66D9EF

安裝 Vundle 與外掛 python-mode 和外掛 pydiction

vim +PluginInstall +qall

延伸閱讀

results matching ""

    No results matching ""