1

Anyone knows how to configure vim so that line number can show/hide by F10?

Now I'm typing set nu/nonu,which is not convenient...

1 Answer 1

5

map <F10> :set number! <- Should do the trick (AFAIK, the ! at the end makes it a toggle, instead of an always-on).

EDIT: Apologies, I forgot an important note (which you may have already known, but it was inconsiderate of me to forget): To make this persistent, add this line to your .vimrc file.

Take a look at this page for reference, and this SO question for more.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .