Skip to content

Instantly share code, notes, and snippets.

@svs
Created January 30, 2012 17:44
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 svs/1705618 to your computer and use it in GitHub Desktop.
Save svs/1705618 to your computer and use it in GitHub Desktop.
ruby-mode.el differentiate symbols from ordinary variables
git diff
diff --git a/ruby-mode.el b/ruby-mode.el
index b556e95..838d811 100644
--- a/ruby-mode.el
+++ b/ruby-mode.el
@@ -1169,7 +1169,7 @@ balanced expression is found."
2 font-lock-type-face)
;; symbols
'("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|\\[\\]=?\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\
- 2 font-lock-reference-face)
+ 2 font-lock-string-face)
;; expression expansion
'("#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)"
0 font-lock-variable-name-face t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment