## About This userscript gives users some quick key bindings to speed up the process of editing mathjax/chem/etc. into posts. **Example usage**: (the hotkeys are customizable!) 1. Pressing <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> would insert `\pi` directly. 2. Pressing <kbd>Alt</kbd>+<kbd>R</kbd> would insert `\mathrm{}` with the caret auto-placed in the middle. Pressing Alt-R again would _unwrap_ the `\mathrm{}` back. 3. Pressing <kbd>Alt</kbd>+<kbd>R</kbd> with some `text` pre-selected would insert `\mathrm{text}`, retaining the selection on the text. Pressing Alt-R again would _unwrap_ the `\mathrm{text}` back to `text`, retaining the selection on text. 4. Prepending <kbd>Ctrl</kbd> to any of the above keybindings will auto-surround the insertion text with `$$` (or `\$` on some other SE sites) 5. The keybinding and its associated insertion text can be modified by the user. So, you can set it to insert `\pi` on <kbd>Alt</kbd>+<kbd>A</kbd> instead. Moreover, there are certain reserved keycodes like: - <kbd>Alt</kbd>-<kbd>Z</kbd> => dollar-ifying (`text` => `$text$`) - <kbd>Alt</kbd>-<kbd>C</kbd> => double dollar-ifying (`text` => `$$text$$`) - <kbd>Alt</kbd>-<kbd>A</kbd> => frac-ify (`A/B` => `\frac{A}{B}`) - <kbd>Alt</kbd>-<kbd>S</kbd> => align-ify ([image demo](https://i.sstatic.net/RmWFQ.png)) You can still change their keycode or entirely disable them as well, the given Z/C/A/etc. keycombos are just the default values. Read more on the [GitHub page][1]. ## Install [Install link][2] (and [view source][3]) ## TODO: 1. Advertise in site-specific meta posts and meet specific feature requests as needed 2. Beta test! ## Note This userscript expands the featureset of the [previous userscript][4] and has been built from the ground up - six years later! ## License Do whatever you wish to do, just don't sell this for money (but may use it in a commercial software's code) or state that you made it yourself. Do post here an answer if you do something cool with this :D ## Contribute Post bugs or feature requests as answers below! [1]: https://github.com/GaurangTandon/MarkdownShortcutsForSE [2]: https://github.com/GaurangTandon/MarkdownShortcutsForSE/raw/master/MarkdownShortcutsSE.user.js [3]: https://github.com/GaurangTandon/MarkdownShortcutsForSE/blob/master/MarkdownShortcutsSE.user.js [4]: https://stackapps.com/questions/3373/mathjax-buttons