10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

scss-mode.elを使う

Posted at

compassを使ってsass(scss)を書くようことにしたので設定

scss-mode.elを取得
https://github.com/antonj/scss-mode

emacs-lispファイル用のパスの通ったところに置く

下記を.emacsに加える

.emacs
;; パスを指定
(add-to-list 'load-path "~/.emacs.d/vendor")

(require 'scss-mode)
(add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode))

;; インデント幅を2にする
;; コンパイルは compass watchで行うので自動コンパイルをオフ
(defun scss-custom ()
  "scss-mode-hook"
  (and
   (set (make-local-variable 'css-indent-offset) 2)
   (set (make-local-variable 'scss-compile-at-save) nil)
   )
  )
(add-hook 'scss-mode-hook
  '(lambda() (scss-custom)))

そのうちscss-modeを改造して保存時にcompass watchが走るcompass-modeを作りたい

10
10
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?