Linux下的编译器vim
vim是Linux下自带而且非常强大的编译器,但是它与一些集成的IDE相
常简单并且可以随手配置出自己喜欢的风格,对于初学者当然还是建议
用原味的,要做到熟悉vim的一些基本快捷键。最难受到就是一些,用了
有一段时间,自己想有一个可以的开发环境,那么你就可以用那些大牛
写好的安装过程,一步一步来,但其中也有一些坑大家需要注意。
这里我就把我遇到的坑和解决办法讲解,如果和我遇到的一样那么不用
绕弯子查找问题了。很麻烦的~
首先说自己遇到的坑
- 用户模式下,sudo命令不能用(说要尊重隐私什么…还此时将被告知)
- vim版本7.4.160版本不支持YouCompleteMe
- 安装完8.0版本vim却找不到路径
- vim版本升级到8.0,但是不支持python(python需要2.7或者3.0版本)
安装好后只能在root模式下能代码补全,用户模式却不支持
前言
最开始我看到了vimplus,是通过百度贴吧看到的,一看是大牛写好的一键安装式,也就是傻瓜式安装,别太在意,我也喜欢傻瓜式安装,因为这样就省去了好多麻烦,所以我就开始了我的第一次尝试。然而并不简单(不会很难,会了也就是那么回事),我没有在我用的Linux操作系统上直接安装,而是重新装了个Linux操作系统拟机,我建议能重装最好,到官网上下载最新镜像文件(其实这很容易,如果不会请自行百度)。
(我用的centos镜像文件是 CentOS-7-x86_64-DVD-1708.iso 目前是官网上最新版本的镜像文件)
在尝试安装前,最好先全部看一下博客内容,也许会少很多麻烦
安装好Centos 7 用户模式下sudo不能用
1第一个遇到的问题就是,在用户模式下,比如输入sudo yum list | grep lrzsz 会被说要尊重隐私什么…还此时将被告知。这个问题其实很简单,只要输入
注意:被 // 隐掉的都不是必须要输入的命令
su
进入root模式
cd /etc/
chmod 660 sudoers
vim sudoers
// 然后找到里面有一行root ALL = (ALL) ALL
// 在下一行添加自己的用户名 和ALL = (ALL) ALL