手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

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

[日期:2017-01-15] 来源:Linux社区  作者:ArchurSpace [字体: ]

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 <f2> :NERDTreeToggle<cr>  

    " 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
左边是NERDTree


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

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

下面会继续出在Vim上配置Java开发环境的详细步骤以及很难下到的插件。

Linux下编译安装Vim8.0  http://www.linuxidc.com/Linux/2017-01/139210.htm

Vim学习指南 http://www.linuxidc.com/Linux/2013-08/89096.htm

Vim编辑器配置 http://www.linuxidc.com/Linux/2016-09/135460.htm

Vim编辑器使用 http://www.linuxidc.com/Linux/2016-09/135043.htm

快速学会 Vi编辑器 http://www.linuxidc.com/Linux/2013-08/88586.htm

强大的Vim 编辑器 http://www.linuxidc.com/Linux/2013-07/87544.htm

Linux文本编辑器Vim的一般用法  http://www.linuxidc.com/Linux/2016-11/137263.htm

把Vim打造成优秀的C++ IDE  http://www.linuxidc.com/Linux/2016-06/132262.htm

Ubuntu 14.04升级Vim7.4到8.0  http://www.linuxidc.com/Linux/2016-11/136816.htm

Vim安装youcompleteme自动补全插件  http://www.linuxidc.com/Linux/2016-11/137665.htm

Linux Vim编辑器使用简单讲解  http://www.linuxidc.com/Linux/2016-12/138930.htm

本文永久更新链接地址http://www.linuxidc.com/Linux/2017-01/139565.htm

linux
相关资讯       Vim配置  Python开发环境 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款