如何设置显示vim编辑器的行号

6122阅读 5评论2011-08-12 随1意2o
分类:LINUX

VIM 配置:
在root用户下进行操作;
 1、在/etc/vim/下打开找到vimrc文件;
 2、用vi打开vimrc
 3、去掉引号,set mouse = a (支持鼠标)
 4、在最后加上三行
      a、set nu
      b、set autoindent
      c、 set cindent
 5、保存并推出

vimrc文件内容
  1 set fileencodings=utf-8,gbk,ucs-bom,cp936                                                                                        
  2 set encoding=utf-8
  3 set nocompatible
  4 set number
  5 filetype on
  6 set history=1000
  7 syntax on
  8 set autoindent
  9 set smartindent
 10 set showmatch
 11 set guioptions-=T
 12 set vb t_vb=
 13 set ruler
 14 set nohls
 15 :set cindent
 16 set tabstop=4
 17 set shiftwidth=4
 18 set incsearch
 19 set cursorline 已测试,设置vim编辑器的光标线
 20 source $VIMRUNTIME/ftplugin/man.vim
 21 map :Tlist
 22 set tags=tags;
 23 set autochdir

还有其他的设置尚未明白其用途
上一篇:shell中的递归函数
下一篇:linux常用的命令

文章评论