码迷,mamicode.com
首页 > 编程语言 > 详细

Ubuntu配置vim支持Python编程

时间:2014-09-13 10:41:15      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:ubuntu   python   vim   插件   git   

如未安装vim,使用下面命令安装:

sudo apt-get install vim

在用户目录下创建.vim目录,其下创建bundle目录:

mkdir .vim\bundle

安装Bundle/Vundle:

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

创建或编辑用户目录下的.vimrc文件,添加如下内容:

set nocompatible
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" The bundles you install will be listed here
Bundle 'scrooloose/nerdtree'
Bundle 'davidhalter/jedi-vim'

filetype plugin indent on

" The rest of your config follows here.

augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%120v.*/
autocmd FileType python set nowrap
augroup END

" NerdTree Shortcut.
map <f2> :NERDTreeToggle<cr>

" automatically change window’s cwd to file’s dir
set autochdir

" Prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
set nu!

打开vim,键入命令“:BundleInstall”,等待自动安装插件完成(下面显示“done”)

在vim中键入命令“:BundleList”可以查看安装的插件。

Ubuntu配置vim支持Python编程

标签:ubuntu   python   vim   插件   git   

原文地址:http://blog.csdn.net/mackz/article/details/39249431

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!