Using the Numpad in vi over SSH

One of the things that kept on bothering me when SSH’ing is that the keys of the numpad would not work in vi: when pressing any key on the numpad, another key would be sent somehow.

Should’ve Google’d this a lot earlier because the fix is very simple: in the preferences of Terminal, go to Profiles → Your Profile → Advanced and uncheck the “Allow VT100 application keypad mode” option.

You can also tweak this setting from the CLI using PlistBuddy:

/usr/libexec/PlistBuddy -c "Delete 'Window Settings':Pro:StrictVTKeypad" ~/Library/Preferences/ > /dev/null 2>&1
/usr/libexec/PlistBuddy -c "Set 'Window Settings':Pro:StrictVTKeypad bool true" ~/Library/Preferences/

There, much better 🙂

☝ I’ve also added this tweak to ./freshinstall, a tool which I built to automatically configure my MacBook (Preferences, Dotfiles, Installed Software, etc)

Did this help you out? Like what you see?
Thank me with a coffee.

I don't do this for profit but a small one-time donation would surely put a smile on my face. Thanks!

☕️ Buy me a Coffee (€3)

To stay in the loop you can follow @bramus or follow @bramusblog on Twitter.

Published by Bramus!

Bramus is a frontend web developer from Belgium. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.