vim使用及python 插件设置

 

安装python.vim语法高亮

copy python.vim to ~/.vim/afer/ftplugin

 在~/.vimrc中添加配置

set autoindent " same level indent
set smartindent " next level indent
set expandtab
set tabstop
=4
set shiftwidth
=4
set softtabstop
=4

安装pydiction自动完成:

UNIX/LINUX: Place python_pydiction.vim in:  ~/.vim/after/ftplugin/

If this directory doesn't already exist, create it. Vim looks there automatically.

WINDOWS: Assuming you installed Vim to C:\vim\, put python_pydiction.vim in C:\vim\vimfiles\ftplugin

You may install the other files (complete-dict and pydiction.py) anywhere you want. For this example, we'll assume you put them in C:\vim\vimfiles\ftplugin\pydiction\

Don't put any files but python_pydiction.vim in the ftplugin directory, only .vim files should go there.

In your vimrc file, first add the following line to enable ftplugins:
  
        filetype plugin on

then make sure you set "g:pydiction_location" to the full path of where you installed complete-dict, i.e.:
    
        let g:pydiction_location = 'C:/vim/vimfiles/ftplugin/pydiction/complete-dict'

posted @ 2012-03-08 11:40  babykick  阅读(1778)  评论(0编辑  收藏  举报