Skip to content

Instantly share code, notes, and snippets.

@sckzw
Created February 16, 2014 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sckzw/9039498 to your computer and use it in GitHub Desktop.
Save sckzw/9039498 to your computer and use it in GitHub Desktop.
Emacsのverilog-modeで数値を強調表示する ref: http://qiita.com/shuichinet/items/f380f6928fa9bd7421c6
(font-lock-add-keywords
'verilog-mode
'(("\\(\\<[1-9][0-9_]*\\)?'h[0-9_a-fxz]+\\>" . font-lock-string-face) ; 16進数
("\\(\\<[1-9][0-9_]*\\)?'d[0-9_xz]+\\>" . font-lock-string-face) ; 10進数
("\\(\\<[1-9][0-9_]*\\)?'o[0-7_xz]+\\>" . font-lock-string-face) ; 8進数
("\\(\\<[1-9][0-9_]*\\)?'b[01_xz]+\\>" . font-lock-string-face) ; 2進数
("\\<[0-9][0-9_]*\\>" . font-lock-string-face))) ; 基数なし
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment