Open hans-d opened 9 years ago
(defun my/coffee-indent-line ()
(interactive)
(if (zerop (current-column))
(insert " ")
(call-interactively 'coffee-indent-line)))
(defun my/coffee-mode-hook ()
(when (string-match-p "\\.litcoffee\\'" (buffer-name))
(setq indent-line-function 'my/coffee-indent-line)))
(add-hook 'coffee-mode-hook 'my/coffee-mode-hook)
(add-to-list 'auto-mode-alist '("\\.litcoffee\\'" . coffee-mode))
I suppose we should discussion this topic at literate-coffee-mode.
AFAIK the current indent/tab width is the same for every level.
My normal indent is 2 spaces. When writing litcoffee, I would like to use as first indent 4 (or more) spaces, to make it more distinct from the markdown text.