satish kumar :
I know the typical method to set line number in file using set number
, however i want to use this as while opening the file. something like this vim filename ******
Jonathon Reinhart :
You can pass arbitrary commands to vim with +
.
$ vim somefile.txt '+set number'
See the vim
man page.
However, customizations like this usually go in your ~/.vimrc
file:
set number