Added org keybindings and spell checking
This commit is contained in:
parent
3bb80035e6
commit
fc5f4bdc13
@ -58,6 +58,44 @@
|
||||
(map! :desc "Decrease font size" :n "C--" #'text-scale-decrease)
|
||||
(map! :desc "Reset font size" :n "C-=" #'doom/reset-font-size)
|
||||
|
||||
|
||||
;; Org-mode custom keybindings
|
||||
|
||||
(map! :map evil-org-mode-map :nvi "C-k" #'org-backward-element)
|
||||
(map! :map evil-org-mode-map :nvi "C-j" #'org-forward-element)
|
||||
(map! :map evil-org-mode-map :nvi "C-h" #'org-up-element)
|
||||
(map! :map evil-org-mode-map :nvi "C-l" #'org-down-element)
|
||||
|
||||
|
||||
;; Spell checking settings
|
||||
;; TODO make toggling of spell checking ('SPC t s') use flyspell-mode in text modes and flyspell-prog-mode in programming modes (see hooks below)
|
||||
;; Removing hooks for automatic spell checking set here: https://github.com/hlissner/doom-emacs/blob/develop/modules/checkers/spell/config.el
|
||||
(remove-hook! '(org-mode-hook
|
||||
markdown-mode-hook
|
||||
TeX-mode-hook
|
||||
rst-mode-hook
|
||||
mu4e-compose-mode-hook
|
||||
message-mode-hook
|
||||
git-commit-mode-hook)
|
||||
#'flyspell-mode)
|
||||
|
||||
(remove-hook! '(yaml-mode-hook
|
||||
conf-mode-hook
|
||||
prog-mode-hook)
|
||||
#'flyspell-prog-mode)
|
||||
|
||||
(setq ispell-dictionary "english")
|
||||
|
||||
(map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary)
|
||||
|
||||
(defun fd-switch-dictionary()
|
||||
(interactive)
|
||||
(let* ((dic ispell-current-dictionary)
|
||||
(change (if (string= dic "german") "english" "german")))
|
||||
(ispell-change-dictionary change)
|
||||
(message "Dictionary switched from %s to %s" dic change)
|
||||
))
|
||||
|
||||
;; (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
|
||||
;; (add-to-list
|
||||
;; 'auto-mode-alist
|
||||
|
@ -80,7 +80,7 @@
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
(spell +flyspell +everywhere) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
|
Loading…
x
Reference in New Issue
Block a user