adds show kb & settings menu to editor

This commit is contained in:
Matthew Kastor 2013-04-01 15:34:51 -04:00 • committed by nightwing
commit f6d1c1167c
2 changed files with 12 additions and 5 deletions

View file

@ -45,11 +45,6 @@ exports.commands = [{
name: "showSettingsMenu",
bindKey: bindKey("Ctrl-,", "Command-,"),
exec: function (editor) {
}, {
name: "selectall",
bindKey: bindKey("Ctrl-A", "Command-A"),
exec: function(editor) { editor.selectAll(); },
readOnly: true
}, {
name: "centerselection",
bindKey: bindKey(null, "Ctrl-L"),

View file

@ -47,6 +47,8 @@ var EventEmitter = require("./lib/event_emitter").EventEmitter;
var CommandManager = require("./commands/command_manager").CommandManager;
var defaultCommands = require("./commands/default_commands").commands;
var config = require("./config");
var showSettingsMenu = require("./ext/show_settings_menu").showSettingsMenu;
var showKeyboardShortcuts = require("./ext/show_keyboard_shortcuts").showKeyboardShortcuts;
/**
*
@ -2187,6 +2189,16 @@ var Editor = function(renderer, session) {
this.renderer.removeEventListener("beforeRender", onBeforeRender);
};
};
this.showSettingsMenu = function () {
showSettingsMenu(this);
};
this.showKeyboardShortcuts = function () {
showKeyboardShortcuts(this);
};
this.$resetCursorStyle = function() {
var style = this.$cursorStyle || "ace";