Skip to content

Instantly share code, notes, and snippets.

@kuanyui
Last active March 29, 2017 05:47
Show Gist options
  • Save kuanyui/f07579d957ea2dda426b8034d78269ba to your computer and use it in GitHub Desktop.
Save kuanyui/f07579d957ea2dda426b8034d78269ba to your computer and use it in GitHub Desktop.
This SCSS file may stuck your Emacs significantly (at least tested on Emacs 25.1 installed via Brew, statrtup with -Q option). Move cursor to EOL of `$colors:` , press Enter then type some characters. Use `pkill -SIGUSR2 Emacs` to interrupt it forcely. It seems that jit-lock.el is the murdurer.
// === colors ====
$colors:
"base_grey" #e8e8e8,
"base_white" #fff,
"base_black" #333,
"switch1_color" #e6943b,
"swtich2_color" #56b538,
"wireless_color" #4baae2,
"router_color" #969696,
"ite_color" #756bb1,
"ite_home_color" #9e9ac8,
"aspeed_color" #bcbddc;
(define-derived-mode omg-scss-mode css-mode "OMG SCSS"
"Major mode to edit \"Sassy CSS\" files."
(setq-local comment-start "// ")
(setq-local comment-end "")
(setq-local comment-continue " *")
(setq-local comment-start-skip "/[*/]+[ \t]*")
(setq-local comment-end-skip "[ \t]*\\(?:\n\\|\\*+/\\)"))
(add-to-list 'auto-mode-alist '("\\.scss$" . omg-scss-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment