Number pad does not work in vim and less
If you are using Terminal (not iTerm or others), there is a setting that might help. Turn off this setting (sorry, it's in german. But the location should be the same):



If you are using iTerm, there is at least a fix for vim: You can remap the keys to get this to work. Just add the following lines to your ~/.vimrc (Create it, if it doesn't exist.)

inoremap &lt;Esc&gt;Oq 1
inoremap &lt;Esc&gt;Or 2
inoremap &lt;Esc&gt;Os 3
inoremap &lt;Esc&gt;Ot 4
inoremap &lt;Esc&gt;Ou 5
inoremap &lt;Esc&gt;Ov 6
inoremap &lt;Esc&gt;Ow 7
inoremap &lt;Esc&gt;Ox 8
inoremap &lt;Esc&gt;Oy 9
inoremap &lt;Esc&gt;Op 0
inoremap &lt;Esc&gt;On .
inoremap &lt;Esc&gt;OQ /
inoremap &lt;Esc&gt;OR *
inoremap &lt;Esc&gt;Ol +
inoremap &lt;Esc&gt;OS -
inoremap &lt;Esc&gt;OM &lt;Enter&gt;


Source: a comment in the vim wiki.