Skip to content

Instantly share code, notes, and snippets.

@jviereck
Forked from dangoor/gist:345028
Created March 29, 2010 09:44
Show Gist options
  • Save jviereck/347658 to your computer and use it in GitHub Desktop.
Save jviereck/347658 to your computer and use it in GitHub Desktop.
"define metadata";
({
"dependencies": {
"Canon": "0.0"
},
"provides": [
{
"ep": "command",
"name": "vim"
},
//======== [ Some other vim commands go here ]
{
"ep": "keymapping",
"states": {
"start": [
{
"key": "i",
"then": "insertMode"
},
{
"regex": "([0-9]*)k",
"exec": "editor moveUp",
"params": [
{
"name": "n",
"match": 0,
"type": "number",
"defaultValue": 1
}
]
},
{
"regex": [ "([0-9]*)", "(ctrl_|alt_|ctrl_shift|alt_shift|shift_|)left" ],
"exec": "vim moveLeft",
"params": [
{
"name": "n",
"match": 0,
"type": "number",
"defaultValue": 1
}
]
}
],
"insertMode": [
{
"key": "escape",
"then": "start"
},
{
"regex": "(.*)",
"exec": "editor insertText",
"params": [
{
"name": "text",
"match": 0
}
],
"predicates": { "isCommandKey": false }
}
]
}
}
]
});
"end";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment