5

I'm editing my vimrc and I want to map some keys to <F-1..12>.

However I found some commands, like noremap and nnoremap. And they can work so good.


But I don't know what is the difference between the noremap and nnoremap.

I found this quesion, but I still don't understand the difference.

Remi Guan
  • 21,506
  • 17
  • 64
  • 87

1 Answers1

15

nnoremap and noremap are both "no re(cursive) map", the difference is one with n the other not. that is n nore map and nore map, in another word, you are asking the difference between nmap and map

The nnoremap/nmap will work only in Normal mode, but the noremap/map will work in Normal, Visual, Select and Operator-pending modes.

For more information, please read the help doc: :h map-modes There are two tables, which give nice overview of the relation between map commands and modes.

Kent
  • 189,393
  • 32
  • 233
  • 301
  • It's confusing to me too but the chart in `:h map-modes` is helpful (and entertaining `:nunmap can also be used outside of a monastery.`) – rshdev Feb 20 '22 at 02:42