4

I already make extensive use of flyspell-mode to keep my errant spelling in check. However I'm currently trying to break the bad habit of using "it's" for possessive statements. I've had a brief look around and haven't found any grammar checkers but really all I need is to visually hi-light common errors in any buffer which can accept textual prose. Any suggestions of the easiest way to achieve this?

stsquad
  • 4,626
  • 28
  • 45
  • 1
    Closely related: [What options are there for writing better texts in Emacs?](http://emacs.stackexchange.com/q/2171/504) – itsjeyd Dec 03 '14 at 15:04

2 Answers2

2

A brief Google search ("open source English grammar checker" and "langtool emacs") led me to langtool.el, which can be installed using MELPA.

PS: I haven't tried it yet, but I definitely will.

Constantine
  • 9,072
  • 1
  • 34
  • 49
  • Seems like that needs an external java library. I'm not sure if it's commonly packaged. I'll have a look. – stsquad Nov 26 '14 at 02:12
0

My very low rent solution for this particular problem was to use hi-lock mode:

(defun my-hightlight-non-possessive-its ()
  "Turn on hi-lock mode for any (potentially incorrect) usage of it's"
  (interactive)
  (hi-lock-face-phrase-buffer "it's"))

;; Hooks for non-possessive its
(add-hook 'text-mode-hook 'my-hightlight-non-possessive-its)
(add-hook 'prog-mode-hook 'my-hightlight-non-possessive-its))
stsquad
  • 4,626
  • 28
  • 45