VIM安装与配置

1.1 安装vim

终端输入命令安装

centos下安装vim: yum install vim

Ubuntu下安装vim:sudo apt-get install vim

注意:如果安装时提示权限不够,You need to be root to perform this command.就使用root权限;

[centos@localhost ~]$ yum install vim

Loaded plugins: fastestmirror, refresh-packagekit, security

You need to be root to perform this command.

[centos@localhost ~]$ su root

Password:

[root@localhost centos]#

1.2 配置vim

在home目录下,即cd  ~  下  vi  .vimrc

xb@ubuntu:~/xb/c++$ vi ~/.vimrc

  set nu

  set tabstop=4

  set autoindent

  set smartindent

  syntax on

猜你喜欢

转载自www.cnblogs.com/zhidongjian/p/9270483.html
今日推荐