User:Omegatron/Sandbox/Shortcuts for javascript tool

Wraps

 * [ and ]
 * links


 * b or q
 * blockquote tags


 * n
 * nowiki tags


 * p
 * pre


 * c
 * code


 * s
 * span?


 * m or = or + or ...
 * math tags


 * r
 * \mathrm{ } (should handle pre-existing curly brackets


 * smartquotes?
 * smartquotes?


 * d
 * del tags?


 * o
 * { \over }

Chars

 * m or - or -- or _
 * em dash


 * - or n or -- or ---
 * en dash


 * - or -- or --- or
 * minus sign


 * right arrow
 * &rarr; literal


 * space or n or _
 * non-breaking space  entity


 * should be converted to &plusmn; literal
 * should be converted to &plusmn; literal

Other

 * _~
 * _~

math formatting stuff? cdot middot times references?

Clicking anywhere in a word and pressing [ should link it.

Highlighting any part of a word and pressing [ should link that part. If there were already link brackets that intersect with the new link, remove them.

If a link is created with http:// in the beginning, it follows external link rules instead.

Expanded pipe tricks:
 * en:link --> en:link
 * | --> link
 * --> foo
 * /bar --> bar
 * /bar/ --> bar

On Commons, links could have a shortcut to add link

Images (and categories?) require exceptions to these rules, since links can be inside image tags