Skip to content

Instantly share code, notes, and snippets.

@andyleap
Last active August 29, 2015 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andyleap/2378fc4ef8c1410da446 to your computer and use it in GitHub Desktop.
Save andyleap/2378fc4ef8c1410da446 to your computer and use it in GitHub Desktop.
screeps console history
javascript: $(function(){ace.edit($("div.ace_editor")[0]).commands.addCommand({name:"saveFile",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(a,b,c){$("div.controls button.submit").click()}});});
ace.edit($('div.ace_editor')[0]).commands.addCommand({
name: 'saveFile',
bindKey: {
win: 'Ctrl-S',
mac: 'Command-S',
sender: 'editor|cli'
},
exec: function(env, args, request) {
$('div.controls button.submit').click();
}
});
@Timendainum
Copy link

ctrl_s_commit does not work for linux, if you add:
linux: 'Ctrl-S',
after line 4 it will enable linux support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment