标签:
If you need number every time you start vi/vim, append following line to your ~/.vimrc file:
vi ~/.vimrc
Append the following line:
set number
Save and close the file.
Jump to particular line number from a shell prompt, enter:
$ vi +linenumber file.c $ vi +300 initlib.c
Jump to particular line that contains main() function from a shell prompt, enter:
$ vi +/searchTermHere file.c $ vi +/main initlib.c ### note shell escape done with \ ### $ vi +/addUser\( initlib.c $ vi +/addUser\(arg1\) initlib.c
http://www.cyberciti.biz/faq/vi-show-line-numbers/
标签:
原文地址:http://www.cnblogs.com/bitter/p/4390397.html