码迷,mamicode.com
首页 > 其他好文 > 详细

vi编辑器中关键字高亮设置、行号设置

时间:2015-06-23 21:43:09      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:

vi编辑器十分强大,学习,与大家分享

今天分享一点

vi编辑器中关键字高亮设置、行号设置

1.打开终端输入如下命令

 cd /usr/share/vim

 sudo vim vimrc

2.需要获取root密码,不可见,如果输入错误会出现错误提示

Password:

Sorry, try again.

Password:

Sorry, try again.

Password:

Sorry, try again.

sudo: 3 incorrect password attempts


3.进入配置文件之后根据自己需要进行配置

  1 " Configuration file for vim

  2 set modelines=0     " CVE-2007-2438

  3 

  4 " Normally we use vim-extensions. If you want

  5 " remove change the following statements

  6 set nocompatible    " Use Vim defaults instea

  7 set backspace=2     " more powerful backspaci

  8 set ai" auto indenting

  9 set history=100 "keep 100 lines of history

 10 set ruler "show the cursor position

 11 syntax on"syntax highlighting

 12 set hlsearch

 13 set number

 14 

 15 

4.双引号后面是注释,可加可不加

5.保存文件shift+zz退出

6.再次运行sudo vim vimrc

ok



vi编辑器中关键字高亮设置、行号设置

标签:

原文地址:http://blog.csdn.net/u012701023/article/details/46609823

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!