2013年3月20日 星期三 晴



在vim编辑中自动加入行号



编辑初始配置文件即可



2013[root@desktop7 ~]# vim /etc/vimrc


 1 if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"


  2    set fileencodings=utf-8,latin1


  3 endif


  4


  5 set nocompatible        " Use Vim defaults (much better!)


  6 set bs=indent,eol,start         " allow backspacing over everything in insert mode


  7 "set ai                 " always set autoindenting on


  8 "set backup             " keep a backup file


  9 set viminfo='20,\"50    " read/write a .viminfo file, don't store more


 10                         " than 50 lines of registers


 11 set history=50          " keep 50 lines of command line history


 12 set ruler               " show the cursor position all the time


 13 set number



在空白行加入set number,注意不要加在脚本中