4 ms·
Why Vim Uses hjkl & Why JavaScript months start from 0
- zzo38computer 6y agoVim supports arrow keys as well as hjkl (although the original vi only uses hjkl; it was designed for use with a keyboard that does not have separate arrows). I knew the things listed here, although not all of the details they mention. For the months, I would have used 1 for January (due to the convention in most things), but otherwise implement the code in a similar way to what they have there, effectively using 3 less than the string address as the base offset; in assembly language (and in an optimizing C compiler) this would be equally efficient to the code that they have. (Also, the arrows in Dance Dance Revolution are also in this order; I don't know if that is just a coincidence though. It does mean that an implementation using a computer keyboard could allow keys HJKL to be used, and it is easily understandable.)