linux中python编译器的配置_Ubuntu 14.04在Vim上配置Python开发环境

Ubuntu 14.04在Vim上配置Python开发环境

A 安装Vim

sudo apt-get install vim

B 在用户主目录创建bundle文件夹

mkdir -p ~/.vim/bundle

C 安装Vundle

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

D 创建或编辑用户目录下的.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 :NERDTreeToggle

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

set autochdir

autocmd vimenter * NERDTree " 当打开vim时就显示NERDTree 可以通过F2来打开或关闭它

" Prefer spaces to tabs

set tabstop=4

set shiftwidth=4

set expandtab

set nu!

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

F 使用方法

例如: vim hello.py

当按下F2时就可以关掉NERDTree(如果你屏幕小的话),如下:

G 现在是不是觉得VIM特别强大 已经爱上这个编辑器了 ^_^,这下也给我写Python程序增加了bi ge o(∩∩)o…哈哈

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值