Sigh Mode is an Emacs minor mode for sentence highlighting. With it, you can navigate the buffer sentence-by-sentence rather than character-by-character, and dynamically highlight the current sentence.
Emacs 29.1 and later versions ship with use-package.el, and this is the recommended method of installing Sigh Mode.
If your Emacs configuration is in ~/.emacs.d, then clone or download this GitHub repository into the ~/.emacs.d/sigh-mode directory, and add the following to your Emacs configuration file:
(use-package sigh-mode
:load-path "~/.emacs.d/sigh-mode"
:commands (sigh-mode))Alternatively, starting with Emacs 30.1, you can also install Sigh Mode directly from this GitHub repository:
(use-package sigh-mode
:vc (:url "https://github.com/gn0/sigh-mode.git"
:branch "main")
:commands (sigh-mode))Activate Sigh Mode by entering M-x sigh-mode RET.
The following keybindings are available:
| binding | action |
|---|---|
h/left |
move to previous sentence |
l/right |
move to next sentence |
k/up |
move to previous line |
j/down |
move to next line |
You can deactivate Sigh Mode by entering M-x sigh-mode RET again.
If Sigh Mode is invoked in Evil, then h/left and l/right move the cursor character-by-character instead of sentence-by-sentence.
With native compilation turned off, this misbehavior is fixed by switching to Emacs state and back, by pressing C-z twice.
With native compilation turned on, the misbehavior is resolved after Emacs is restarted and Sigh Mode is loaded a second time.
