Skip to content

Instantly share code, notes, and snippets.

@sstephenson
Created September 26, 2010 16: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 sstephenson/598096 to your computer and use it in GitHub Desktop.
Save sstephenson/598096 to your computer and use it in GitHub Desktop.
;; How to unfuck html-helper-mode.
(add-hook 'html-helper-mode-hook
'(lambda ()
(auto-fill-mode nil)
(set (make-local-variable 'indent-line-function)
'sgml-indent-line)
(define-key html-helper-mode-map (kbd "RET") 'newline-and-indent)
(define-key html-helper-mode-map (kbd "TAB") 'indent-for-tab-command)))
(setq html-helper-new-buffer-template
'("<!DOCTYPE html>\n"
"<html>\n\n"
"<head>\n"
" <meta charset=\"utf-8\">\n"
" <title>" p "</title>\n"
"</head>\n\n"
"<body>\n " p "\n"
"</body>\n\n"
"</html>\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment