One quick tip for vim users out there: you can toggle a setting by appending the
! to it. So while you’d normally
set :number and
set :nonumber, you can instead just:
nnormap <leader>n set:number!
Then just hit
<leader>n to toggle line numbers (or whatever the setting) off and on.