Vim 命令

行号

零时显示行号
:set number :set nu
永久显示行号
vim ~/.vimrc
在打开的vimrc文件中最后一行输入:set number ,然后保存退出。再次用vim打开文件时,就会显示行号了。
取消行号
:set nonumber :set nonu