summary refs log tree commit diff
path: root/emacs/custom/my-text.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom/my-text.el')
-rw-r--r--emacs/custom/my-text.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacs/custom/my-text.el b/emacs/custom/my-text.el
index c926be3..3d8c9fd 100644
--- a/emacs/custom/my-text.el
+++ b/emacs/custom/my-text.el
@@ -16,6 +16,20 @@
 (when (executable-find "pandoc")
   (setq markdown-command "pandoc -f markdown -t html"))
 
+(require 'dabbrev)
+(require 'abbrev)
+(let ((map global-map))
+  (define-key map (kbd "M-/") #'dabbrev-expand)
+  (define-key map (kbd "C-x M-/") #'dabbrev-completion))
+
+(setq only-global-abbrevs nil)
+(let ((table text-mode-abbrev-table))
+  (define-abbrev table "github" "GitHub")
+  (define-abbrev table "emacs" "Emacs"))
+
+(dolist (hook '(text-mode-hook git-commit-mode-hook))
+  (add-hook hook #'abbrev-mode))
+
 (provide 'my-text)
 
 ;;; my-text.el ends here