So, You Just Got A Mechanical Keyboard...

There's definitely a correlation between Vim fans and mechanical keyboard users. The speed, accuracy, and feel of mechanical keyboards is great, and the choice of keyboards can even help you improve your Vim skills.

I have a tenkeyless keyboard with Topre switches and while it feels completely gorgeous, I had to change a few things to make it work really well. I set my Mac's key repeat speed to 'fast', and the delay to 'short':

Mac key repeat speed

I also tweaked how long Vim waits for input. ttimeoutlen is used for key code delays, so if you're fast you could set it to 0, like this:

:set timeoutlen=2000 ttimeoutlen=0

The timeoutlen setting is for multikey mappings. This would give Vim two seconds to recognise a multikey shortcut, but it would also increase the speed that Vim switches from Insert mode to Normal mode. Before committing this to your ~/.vimrc you can try out different values to see if it helps. I've seen lots of dotfiles with ttimeoutlen set to 10, for example.

I find Topre keys more sensitive than the other keyboards I'm used to, so I actually like to set the timeouts and key repeat settings to faster values because after a few days of practice I feel like I can type better. But I'm prepared to accept this could be an illusion created by the amazing build quality of a high-end mechanical keyboard!

blog comments powered by Disqus