CentOS安装vim
2016-04-18 15:27
417 查看
VMware下CentOS安装成功后,默认自带vi,但vi功能没vim丰富。以下为CentOS中安装vim:
用yum产看源中的vim安装包:
其中,vim编辑器需要安装三个包
1. 查看本机已存在的vim包,确认一下vim包是否已经安装:
2.如果未出现以上的安装包,执行以下命令即可完成vim包的安装:
3.测试vim包是否安装成功:
[xi@localhost ~]$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 10 2014 06:55:55)
--------------------------------------------------------------------------------------------------------------------------
P.S. vim编辑器环境配置:
是在用户登录的~目录下创建一个 .vimrc文件,在其中进行自己习惯的编程环境的设置,这样当别的用户使用时并不相互影响。
在.vimr c文件中输入以下内容:
用yum产看源中的vim安装包:
[xi@localhost ~]$ yum search vim Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: ftp.jaist.ac.jp * extras: ftp.jaist.ac.jp * updates: ftp.jaist.ac.jp =============================== N/S matched: vim =============================== golang-vim.noarch : Vim plugins for Go protobuf-vim.x86_64 : Vim syntax highlighting for Google Protocol Buffers : descriptions vim-X11.x86_64 : The VIM version of the vi editor for the X Window System vim-common.x86_64 : The common files needed by any version of the VIM editor vim-enhanced.x86_64 : A version of the VIM editor which includes recent : enhancements vim-filesystem.x86_64 : VIM filesystem layout vim-minimal.x86_64 : A minimal version of the VIM editor Name and summary matches only, use "search all" for everything.
其中,vim编辑器需要安装三个包
:
vim-enhanced-7.0.109-7.el5
vim-minimal-7.0.109-7.el5
vim-common-7.0.109-7.el5
1. 查看本机已存在的vim包,确认一下vim包是否已经安装:
[xi@localhost ~]$ rpm -qa|grep vim vim-minimal-7.4.160-1.el7.x86_64 vim-filesystem-7.4.160-1.el7.x86_64 vim-common-7.4.160-1.el7.x86_64 vim-enhanced-7.4.160-1.el7.x86_64
2.如果未出现以上的安装包,执行以下命令即可完成vim包的安装:
$ yum -y install vim*
3.测试vim包是否安装成功:
[xi@localhost ~]$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 10 2014 06:55:55)
--------------------------------------------------------------------------------------------------------------------------
P.S. vim编辑器环境配置:
是在用户登录的~目录下创建一个 .vimrc文件,在其中进行自己习惯的编程环境的设置,这样当别的用户使用时并不相互影响。
[xi@localhost ~]$ cd ~ [xi@localhost ~]$ ls Desktop Documents Downloads Music Pictures Public Templates Videos [xi@localhost ~]$ touch .vimrc [xi@localhost ~]$ vim .vimrc
在.vimr c文件中输入以下内容:
set nu // 设置显示行号 set showmode //设置在命令行界面最下面显示当前模式等。 set ruler //设置在右下角显示光标所在的行数等信息 set autoindent // 设置每次单击Enter键后,光标移动到下一行时与上一行的起始字符对>齐 syntax on // 即设置语法检测,当编辑C或者Shell脚本时,关键字会用特殊颜色显示
相关文章推荐
- CentOS安装sass-lang报错Temporary failure in name resolution
- linux命令详解——iostat
- linux命令详解——iostat
- linux socket 编程(C语言)
- 使用ssh远程重装centos
- [rm] Linux 防止"rm -rf /" 误删除
- linux使用scp实现服务器A向服务器B传输文件
- CentOS忘记密码或者丢失口令解决方法
- 使用centos6.6部署Cobbler--自动安装centos系统
- linux服务器之间传输文件的四种方式
- Linux命令分类
- VMware Player 7 下扩展 CentOS 7 硬盘空间
- linux命令学习使用记录
- 详解Linux2.6内核中基于platform机制的驱动模型
- Linux环境下段错误的产生原因及调试方法小结
- AML_看门狗驱动分析
- centos MYSQL 主从同步配置
- yum源的配置(centos6.5)
- Linux基本操作命令
- centos6.5 ssh安全优化,修改默认端口名,禁止root远程登录