Keyboard assignments for Critic Markup

Using Critic Markup a lot this evening, and not finding any existing keyboard assignments (may well have missed some) I dropped a few into a simple plugin:

{++toggleAddition++}    ⌥⇧⌘=  (+ key on my system) 
{>>toggleComment<<}    ⌥⇧⌘.  (> key)
{--toggleDeletion--}    ⌥⌘-
{==toggleHighlight==}    ⌥⌘=
{~~toggleSubstitution~>~backtick~~}    ⌘`  (assigning ~ seemed to be out of reach)

It just needs two small text files an .ftplugin folder in the File > Open Application Folder Plug-Ins folder.

main.js

define(function (require, exports, module) {
	var Extensions = require('ft/core/extensions').Extensions;
	Extensions.addInit(function (editor) {
		editor.addKeyMap({
			'Shift-Cmd-Alt-=': 'toggleAddition',
			'Cmd-Alt--': 'toggleDeletion',
			'Cmd-`': 'toggleSubstitution',
			'Shift-Cmd-Alt-.': 'toggleComment',
			'Cmd-Alt-.': 'toggleComment',
			'Cmd-Alt-=': 'toggleHighlight'
		});
	});
});

and package.json

{
    "name": "Add some custom keyboard shortcuts",
    "version": "1.0.0",
    "description": "Various custom keyboard shortcuts",
    "engines": {
        "foldingtext": ">=2.0.0",
        "taskpaper": ">=3.0.0"
    },
    "homepage": ""
}

We really could use a central repository. Similar to Packal.org for Alfred workflows. Searching the forums is not as easy.

I think perhaps the Extensions Wiki can serve well as a central repository.

(Good middle ground, with a light curation burden)

Thanks for the prompt – I’ve added links for command and shortcut listing, and for adding Critic Markup toggle keys.