使用VIM打造最好的 Linux python开发环境

打开

vim +':NERDTree' +':TagbarToggle'

查看vim版本

  • 判断是否支持python
    在这里插入图片描述

VIM Extensions(扩展)

安装vundle插件管理工具

  • 下载插件
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  • 创建文件
touch ~/.vimrc
  • ~/.vimrc添加配置内容
set nocompatible              " required
filetype off                  " required

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

" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

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

" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)


" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
  • ~/.vimrc文件的normal模式下下载插件,输入
:PluginInstall

或者在命令行输入

vim +PluginInstall +qall

安装vim8

./configure --with-features=huge --enable-multibyte  --enable-python3interp=yes --with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/ --prefix=/usr/local/vim81

./configure --with-features=huge --enable-python3interp --enable-pythoninterp --with-python-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/ --enable-rubyinterp --enable-luainterp --enable-perlinterp --with-python-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/ --enable-multibyte --enable-cscope      --prefix=/usr/local/vim/

  • 报错
checking for tgetent()... configure: error: NOT FOUND!       You need to install a terminal library;
  • 执行
yum install ncurses ncurses-devel
  • 详细的参数说明
--with-features=huge:						//支持最大特性
--enable-rubyinterp:						//打开对ruby编写的插件的支持
--enable-luainterp:						//打开对lua编写的插件的支持
--enable-perlinterp:						//打开对perl编写的插件的支持
--enable-multibyte:						//打开多字节支持,可以在Vim中输入中文
--enable-cscope:							//打开对cscope的支持
--enable-pythoninterp:						//打开对python编写的插件的支持
--with-python-config-dir=/usr/lib64/python2.7/config							//指定python config路径。
--enable-python3interp:					//打开对python3编写的插件的支持
--with-python-config-dir=with-python3-config-dir=/usr/local/python3/lib/python3.5/config-3.5m		//指定python3 config路径。

--prefix=/usr/local/vim81					//指定安装路径,可自定义。	

  • 编译报错
make distclean

参考链接

Linux下搭建基于python的VIM
Centos7下编译安装vim8.1并支持python3,解决出现+python/dyn的情况
vim编程配置python3开发环境初级(两个版本)
链接4成功
YouCompleteMe安装

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值