I know
:set number
and
:set nonumber
I want to know whether there is any command in vi/vim
:set togglenumber
to display line number if the line numbers is not showing or hiding line numbers if line numbers is showing.
You can use (on VIM at least):
:set invnumber
More Info:
:set number Turn line numbers on
:set nonumber Turn line numbers off
:set invnumber Toggle line numbers
:set number! Toggle line numbers
:set number& Set option to default value
:set number? Show value of option
source: http://vim.wikia.com/wiki/Managing_set_options#Boolean_options