GithubHelp home page GithubHelp logo

ag91 / writegood-mode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bnbeckwith/writegood-mode

3.0 2.0 0.0 29 KB

Minor mode for Emacs to improve English writing

Home Page: http://bnbeckwith.com/code/writegood-mode.html

Emacs Lisp 100.00%

writegood-mode's Introduction

Writegood Mode

This is a minor mode to aid in finding common writing problems. Matt Might’s weaselwords scripts inspired this mode.

It highlights text based on a set of weasel-words, passive-voice and duplicate words.

Basic Usage

First, load in the mode.

(add-to-list 'load-path "path/to/writegood-mode")
(require 'writegood-mode)
(global-set-key "\C-cg" 'writegood-mode)

I use the command key above to start the mode when I wish to check my writing.

Alternatively, this package is also available on MELPA. If installed through the package manager, then only the global key customization would be necessary.

Readability tests

There are now two functions to perform Flesch-Kincaid scoring and grade-level estimation. These follow the known algorithms, but may differ from other implementations due to the syllable estimation.

I use these global keys to get to the readability tests:

(global-set-key "\C-c\C-gg" 'writegood-grade-level)
(global-set-key "\C-c\C-ge" 'writegood-reading-ease)

On the fly

There is support for on-the-fly calculation of the reading score. This means that while you are writing you will see your sentences receive a score in the modeline.

There are three events that triggers the on-the-fly calculation:

  1. closing a sentence with a ‘.’ character.
  2. filling a paragraph (typically done in Emacs with M-q)
  3. saving the buffer

These events will trigger the score calculation for the sentence, paragraph and buffer at point respectively.

This feature can be toggled on and off with:

(writegood-on-the-fly-toggle)

Or by pressing M-x writegood-on-the-fly-toggle.

Customization

The user is free to customize three main portions of the mode.

Faces

The three faces used pull from the default warning face and add subtle backgrounds. There is a separate face for each check performed.

  • Weasel words (writegood-weasels-face)
  • Passive voice (writegood-passive-voice-face)
  • Duplicate words (writegood-duplicates-face)

Weasel Words

There is a large list of included weasel words, but you may have your own. See the write-good-weasel-words variable to modify this list.

Passive Voice Irregulars

There is also a list of irregular passive voice verbs. These are the verbs that do not end in ‘ed’ to signify past tense. This variable allow the user to modify the list as needed.

Modes For On The Fly Scoring

One can customize the modes in which the on-the-fly feature should run (for instance may not make sense to check readability scores in a programming mode). The variable to customize is: writegood-on-the-fly-modes.

An example of customization can be:

(add-to-list 'writegood-on-the-fly-modes "some-cool-mode")

By default this is set to:

'("text-mode" "fundamental-mode" "org-mode" "latex-mode" "rst-mode" "markdown-mode" "mu4e-compose-mode")

Alternatives

Artbollocks looks to be an alternative mode to this one.

writegood-mode's People

Contributors

ag91 avatar bennn avatar bnbeckwith avatar fehrenbach avatar frankshearar avatar reedrelay avatar sten0 avatar zimoun avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.