- var variablesPattern = /\$\{(.*?)\}/g;\r
-\r
- var replaceVariables = ( function() {\r
- // Swaps keystrokes with their commands in object literal.\r
- // This makes searching keystrokes by command much easier.\r
- var keystrokesByCode = editor.keystrokeHandler.keystrokes,\r
- keystrokesByName = {};\r
-\r
- for ( var i in keystrokesByCode )\r
- keystrokesByName[ keystrokesByCode[ i ] ] = i;\r
+ var variablesPattern = /\$\{(.*?)\}/g,\r
+ replaceVariables = function( match, name ) {\r
+ var keystrokeCode = editor.getCommandKeystroke( name );\r