Skip to content

Instantly share code, notes, and snippets.

@hollobon
Created August 25, 2015 16:01
Show Gist options
  • Save hollobon/b62fde98c6240b8ed48e to your computer and use it in GitHub Desktop.
Save hollobon/b62fde98c6240b8ed48e to your computer and use it in GitHub Desktop.
Convert binary (0b) literals to hex (0x) literals in Emacs
M-x replace-regexp 0b\([01]+\) \,(format "0x%X" (string-to-number \1 2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment