File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -636,6 +636,27 @@ and jump to the corresponding one."
636636 (when ov
637637 (goto-char (overlay-start ov))))))))
638638
639+ (defun evil-ispell-mark-word-as-good (word )
640+ " Add WORD under the cursor as a good word to the Ispell dictionary."
641+ (interactive (list (thing-at-point 'word )))
642+ (ispell-send-string (concat " *" word " \n " ))
643+ ; ; dictionary modified!
644+ (setq ispell-pdict-modified-p '(t ))
645+ (ispell-pdict-save ispell-silently-savep)
646+ (when-let ((flyspell-mode )
647+ (start (car (bounds-of-thing-at-point 'word ))))
648+ (flyspell-unhighlight-at start))
649+ (message " Word '%s ' added to dictionary " (upcase word)))
650+
651+ (defun evil-ispell-mark-word-as-locally-good (word )
652+ " Add WORD under the cursor to the local word list."
653+ (interactive (list (thing-at-point 'word )))
654+ (ispell-add-per-file-word-list word)
655+ (when-let ((flyspell-mode )
656+ (start (car (bounds-of-thing-at-point 'word ))))
657+ (flyspell-unhighlight-at start))
658+ (message " Word '%s ' added to local word list " (upcase word)))
659+
639660(evil-define-motion evil-next-flyspell-error (count )
640661 " Go to the COUNT'th spelling mistake after point."
641662 (interactive " p" )
Original file line number Diff line number Diff line change 8282(define-key evil-normal-state-map " za" 'evil-toggle-fold )
8383(define-key evil-normal-state-map " zr" 'evil-open-folds )
8484(define-key evil-normal-state-map " zm" 'evil-close-folds )
85+ (define-key evil-normal-state-map " zg" 'evil-ispell-mark-word-as-good )
86+ (define-key evil-normal-state-map " zG" 'evil-ispell-mark-word-as-locally-good )
8587(define-key evil-normal-state-map " z=" 'ispell-word )
8688(define-key evil-normal-state-map " \C -n" 'evil-paste-pop-next )
8789(define-key evil-normal-state-map " \C -p" 'evil-paste-pop )
You can’t perform that action at this time.
0 commit comments