How to use set line number in file along with vim command

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=12182&siteId=1