编辑器最大化快捷键调整

This commit is contained in:
Liang Ding 2014-10-22 13:38:52 +08:00
parent 562c8ba1e9
commit a459f99f9d
4 changed files with 16 additions and 2 deletions

View File

@ -70,6 +70,7 @@
"goto_line": "跳转到行", "goto_line": "跳转到行",
"delete_line": "删除当前行", "delete_line": "删除当前行",
"save_editor_file": "保存当前编辑器文件", "save_editor_file": "保存当前编辑器文件",
"save_all_editors_files": "保存所有编辑器文件",
"close_editor": "关闭当前编辑器", "close_editor": "关闭当前编辑器",
"full_screen": "编辑器全屏", "full_screen": "编辑器全屏",
"auto_indent": "自动缩进", "auto_indent": "自动缩进",

View File

@ -477,7 +477,14 @@ var editors = {
} }
wide.fmt(currentPath, wide.curEditor); wide.fmt(currentPath, wide.curEditor);
}, },
"Alt-F7": "findUsages" "Alt-F7": "findUsages",
"Shift-Alt-Enter": function () {
if (windows.isMaxEditor) {
windows.restoreEditor();
} else {
windows.maxEditor();
}
},
} }
}); });

View File

@ -1,4 +1,5 @@
var windows = { var windows = {
isMaxEditor: false,
init: function () { init: function () {
$(".footer .ico-restore:eq(1)").click(function () { $(".footer .ico-restore:eq(1)").click(function () {
windows.restoreBottom(); windows.restoreBottom();
@ -163,6 +164,8 @@ var windows = {
windows.minBottom(); windows.minBottom();
windows.minSide(); windows.minSide();
wide.curEditor.focus(); wide.curEditor.focus();
windows.isMaxEditor = true;
}, },
restoreEditor: function () { restoreEditor: function () {
$(".toolbars .ico-restore").removeClass("ico-restore").addClass("ico-max") $(".toolbars .ico-restore").removeClass("ico-restore").addClass("ico-max")
@ -174,6 +177,8 @@ var windows = {
windows.restoreBottom(); windows.restoreBottom();
windows.restoreSide(); windows.restoreSide();
wide.curEditor.focus(); wide.curEditor.focus();
windows.isMaxEditor = false;
}, },
clearFloat: function () { clearFloat: function () {
if ($(".footer .ico-restore:eq(0)").css("display") === "inline") { if ($(".footer .ico-restore:eq(0)").css("display") === "inline") {

View File

@ -16,8 +16,9 @@
<li>Ctrl+G{{.i18n.colon}}{{.i18n.goto_line}}</li> <li>Ctrl+G{{.i18n.colon}}{{.i18n.goto_line}}</li>
<li>Ctrl+E{{.i18n.colon}}{{.i18n.delete_line}}</li> <li>Ctrl+E{{.i18n.colon}}{{.i18n.delete_line}}</li>
<li>Ctrl+S{{.i18n.colon}}{{.i18n.save_editor_file}}</li> <li>Ctrl+S{{.i18n.colon}}{{.i18n.save_editor_file}}</li>
<li>Shift+Ctrl+S{{.i18n.colon}}{{.i18n.save_all_editors_files}}</li>
<li>Ctrl+Q{{.i18n.colon}}{{.i18n.close_editor}}</li> <li>Ctrl+Q{{.i18n.colon}}{{.i18n.close_editor}}</li>
<li>F11{{.i18n.colon}}{{.i18n.full_screen}}</li> <li>Shift+Alt+Enter{{.i18n.colon}}{{.i18n.full_screen}}</li>
<li>Shift+Tab{{.i18n.colon}}{{.i18n.auto_indent}}</li> <li>Shift+Tab{{.i18n.colon}}{{.i18n.auto_indent}}</li>
<li>Ctrl+]{{.i18n.colon}}{{.i18n.indent}}</li> <li>Ctrl+]{{.i18n.colon}}{{.i18n.indent}}</li>
<li>Ctrl+[{{.i18n.colon}}{{.i18n.unindent}}</li> <li>Ctrl+[{{.i18n.colon}}{{.i18n.unindent}}</li>