Skip to content

Commit

Permalink
Improve indenting in cfml files
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Myers committed Aug 9, 2016
1 parent 57a4e9e commit 58989f7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lisp/init-local.el
Expand Up @@ -51,13 +51,19 @@
'js2-mode-hide-warnings-and-errors)


(defun my-enter ()
"Inserts a newline character then indents the new line just like the previous line"
(interactive)
(newline)
(unless (looking-back "\\`\n*")
(indent-relative-maybe)))

(add-hook 'web-mode-hook
(lambda ()
(local-set-key (kbd "RET") 'newline)
(local-set-key (kbd "RET") 'my-enter)
(setq tab-stop-list (number-sequence sgml-basic-offset 120 sgml-basic-offset))
(setq indent-line-function 'tab-to-tab-stop)
(electric-indent-local-mode -1)
))
(electric-indent-local-mode -1)))

(global-set-key (kbd "<S-tab>") 'un-indent-by-removing-4-spaces)

Expand Down

0 comments on commit 58989f7

Please sign in to comment.