Skip to content

Instantly share code, notes, and snippets.

@dcluna

dcluna/*scratch* Secret

Created January 10, 2017 00:42
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 dcluna/c7b9be4e71b5ea0993cd056fa48283f5 to your computer and use it in GitHub Desktop.
Save dcluna/c7b9be4e71b5ea0993cd056fa48283f5 to your computer and use it in GitHub Desktop.
ruby-trace-mode for Emacs
(define-derived-mode ruby-trace-mode grep-mode "RbTrace"
"Highlights matches from a Tracer run."
(setq-local compilation-error-regexp-alist '(ruby-trace))
(setq-local compilation-error-regexp-alist-alist '((ruby-trace "^\\(?:#[0-9]+:\\)?\\(.*?[^/\n]\\):[ ]*\\([1-9][0-9]*\\)[ ]*:" 1 2)))
)
(add-to-list 'auto-mode-alist '("\\.rb_trace\\'" . ruby-trace-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment