Use same things as in prog mode, in the text-mode

This commit is contained in:
Maciej 2018-09-14 20:47:50 +03:00
parent 33741be3e6
commit b9e1581440
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
2 changed files with 6 additions and 0 deletions

View file

@ -6,6 +6,7 @@
;;; Show trailing whitespace and remove whitespace on save
(require 'whitespace)
(add-hook 'prog-mode-hook 'whitespace-mode)
(add-hook 'text-mode-hook 'whitespace-mode)
(setq whitespace-style '(face trailing empty))
;;; Cleanup whitespace on save
@ -22,9 +23,11 @@
;;; Rainbow parenthesis
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
(add-hook 'text-mode-hook 'rainbow-delimiters-mode)
;;; Show hex colors as colors
(add-hook 'prog-mode-hook 'rainbow-mode)
(add-hook 'text-mode-hook 'rainbow-mode)
;;; When pasting/writing over a selection, replace it.
(delete-selection-mode 1)

View file

@ -40,3 +40,6 @@
;;; Yasnippet configuration
(define-key prog-mode-map (kbd "C-c y") 'company-yasnippet)
(define-key prog-mode-map (kbd "<f13>") 'company-yasnippet)
(define-key text-mode-map (kbd "C-c y") 'company-yasnippet)
(define-key text-mode-map (kbd "<f13>") 'company-yasnippet)