From 1835536c99747ae2b281f500d2f17a658c3f3123 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 6 Mar 2012 18:05:46 +0000 Subject: [PATCH] discovered the wonder that is auto-fill-mode --- keybindings.el | 3 +++ languages/markdown.el | 3 +++ 2 files changed, 6 insertions(+) diff --git a/keybindings.el b/keybindings.el index 1f39707..37c3ab8 100644 --- a/keybindings.el +++ b/keybindings.el @@ -30,6 +30,9 @@ (global-set-key (kbd "C-x a =") 'align-to-equals) (global-set-key (kbd "M-]") 'align-to-equals) +;; Toggle auto-fill-mode. +(global-set-key (kbd "C-c q") 'auto-fill-mode) + ;; Comment or uncomment line (global-set-key (kbd "C-c /") 'comment-or-uncomment-region-or-line) (global-set-key (kbd "C-c C-/") 'comment-or-uncomment-region-or-line) diff --git a/languages/markdown.el b/languages/markdown.el index e07800d..d498154 100644 --- a/languages/markdown.el +++ b/languages/markdown.el @@ -1,4 +1,6 @@ (setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist)) +(setq auto-mode-alist (cons '("\\.mkd" . markdown-mode) auto-mode-alist)) +(setq auto-mode-alist (cons '("\\.mkdn" . markdown-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.mdown" . markdown-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.markdown" . markdown-mode) auto-mode-alist)) @@ -8,4 +10,5 @@ (fci-mode) (linum-mode t) (flyspell-mode) + (auto-fill-mode) (define-key markdown-mode-map (kbd "C-c p") 'markdown-preview)))