This display is for normal mode, visual display mode + selection, and operator standby mode (for example, after entering d ):
noremap <F3> :set list!<CR>
The good thing about function keys (versus <Leader> ) is that they can also be displayed in insert mode:
inoremap <F3> <Co>:set list!<CR>
To be complete, you can also create a map for command line mode:
cnoremap <F3> <Cc>:set list!<CR>
Read more about the different display modes in :help map-modes
source share