This user script adds a button when editing Stack Exchange sites that automatically fixes many common grammar, spelling, capitalization, and usage errors.
- Install a user script extension (such as Tampermonkey) for your browser. Greasy Fork maintains a list of user script extensions that are available for various browsers.
- Click here to install editor.user.js within your user script manager.
- Edit a post or a comment on a Stack Exchange site.
- Click the Auto Editor button that appears in the toolbar for posts or below comments.
- The edit area will flash green if edits were automatically made, red if no edits were needed.
- Click the same button again to get a report of what changed, see diffs, and view the status of the unit tests.
- Submit the edits to Stack Exchange after making other manual edits as desired.
⚠️ This tool sometimes suggests edits that make posts worse. You are responsible for manually reviewing all edits. Auto-edit rules are created from heuristics and regular expressions and they are not infallible. This tool is designed to save you effort by doing the right thing 90% of time. Bad auto-edits will need to be manually fixed or abandoned. All edits will have your name attached to them, so you don't want to blindly trust this tool.
This script performs the following actions automatically:
- Expands some acronyms such as "SO" and "SE"
- Corrects commonly misspelled words such as "untill" → "until"
- Fixes contractions with a missing apostrophe such as such as "dont" → "don't"
- Ensures the title starts with a capital letter but is not all caps.
- Removes niceties such as "hello", "thanks", and "please help"
- Removes "Edit:"
- Replaces domain names like "mydomain", "abc" or "foo" that have a real top level domain with officially approved example domains like
example.com. When multiple different example domains are used, the replacements will use the
.exampletop level domain which is also reserved for example usage.
- Applies code formatting to example URLs and file names
To minimize false-auto-corrections, these rules are markdown-aware. For example, spelling corrections are not applied inside code blocks or URLs. Each rule has a list of places where it should be applied.
The rules are coded into the source code for the script. To change the rules, you would need to edit it.