Added support Markdown
This commit is contained in:
parent
b5062a4097
commit
9392325a5b
@ -8,7 +8,9 @@
|
|||||||
'(anzu-replace-threshold 1000)
|
'(anzu-replace-threshold 1000)
|
||||||
'(anzu-replace-to-string-separator " => ")
|
'(anzu-replace-to-string-separator " => ")
|
||||||
'(anzu-search-threshold 1000)
|
'(anzu-search-threshold 1000)
|
||||||
'(package-selected-packages (quote (flycheck nlinum sublime-themes fullframe))))
|
'(package-selected-packages
|
||||||
|
(quote
|
||||||
|
(markdown-mode sublime-themes sml-modeline smart-mode-line-powerline-theme nlinum flycheck anzu))))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
2
init.el
2
init.el
@ -36,7 +36,7 @@
|
|||||||
;; Tools
|
;; Tools
|
||||||
(require 'init-flycheck)
|
(require 'init-flycheck)
|
||||||
;; Languages
|
;; Languages
|
||||||
|
(require 'init-markdown)
|
||||||
|
|
||||||
;;; Loads custom file
|
;;; Loads custom file
|
||||||
(when (file-exists-p custom-file)
|
(when (file-exists-p custom-file)
|
||||||
|
35
lisp/init-markdown.el
Normal file
35
lisp/init-markdown.el
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
;;----------------------------------------------------------------------------
|
||||||
|
;; Markdown mode
|
||||||
|
;;----------------------------------------------------------------------------
|
||||||
|
(require-package 'markdown-mode)
|
||||||
|
|
||||||
|
(autoload 'markdown-mode "markdown-mode"
|
||||||
|
"Major mode for editing Markdown files" t)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
|
||||||
|
|
||||||
|
(eval-after-load "markdown-mode"
|
||||||
|
'(defalias 'markdown-add-xhtml-header-and-footer 'as/markdown-add-xhtml-header-and-footer))
|
||||||
|
|
||||||
|
;;----------------------------------------------------------------------------
|
||||||
|
;; Generated HTML 5 and UTF-8 with Markdown
|
||||||
|
;;----------------------------------------------------------------------------
|
||||||
|
(defun as/markdown-add-xhtml-header-and-footer (title)
|
||||||
|
"Wrap XHTML header and footer with given TITLE around current buffer."
|
||||||
|
(goto-char (point-min))
|
||||||
|
(insert "<!DOCTYPE html>\n"
|
||||||
|
"<html>\n"
|
||||||
|
"<head>\n<title>")
|
||||||
|
(insert title)
|
||||||
|
(insert "</title>\n")
|
||||||
|
(insert "<meta charset=\"utf-8\" />\n")
|
||||||
|
(when (> (length markdown-css-paths) 0)
|
||||||
|
(insert (mapconcat 'markdown-stylesheet-link-string markdown-css-paths "\n")))
|
||||||
|
(insert "\n</head>\n\n"
|
||||||
|
"<body>\n\n")
|
||||||
|
(goto-char (point-max))
|
||||||
|
(insert "\n"
|
||||||
|
"</body>\n"
|
||||||
|
"</html>\n"))
|
||||||
|
|
||||||
|
(provide 'init-markdown)
|
Loading…
x
Reference in New Issue
Block a user