fix hex parsing in vim/emacs modes. Closes #75.