💛 Fix #131
This commit is contained in:
parent
984d93773e
commit
0dfa779ebb
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
func main() {
|
||||
for i := 0; i < 50; i++ {
|
||||
|
||||
fmt.Println("Hello, 世界", pkg.Now())
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
"show_expr_info": "Show Expression Info",
|
||||
"find_usages": "Find Usages",
|
||||
"delete_line": "Delete Line",
|
||||
"copy_line_up": "Copy Line Up",
|
||||
"copy_line_down": "Copy Line Down",
|
||||
"copy_lines_up": "Copy Lines Up",
|
||||
"copy_lines_down": "Copy Lines Down",
|
||||
"save_editor_file": "Save File",
|
||||
"save_all_editors_files": "Save All",
|
||||
"close_editor": "Close File",
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
"show_expr_info": "式の情報を表示",
|
||||
"find_usages": "使用方法を検索する",
|
||||
"delete_line": "行を削除",
|
||||
"copy_line_up": "前行にコピー",
|
||||
"copy_line_down": "次行にコピー",
|
||||
"copy_lines_up": "フロントへのコピー",
|
||||
"copy_lines_down": "一番下にコピー",
|
||||
"save_editor_file": "保存",
|
||||
"save_all_editors_files": "全てを保存",
|
||||
"close_editor": "エディタを閉じる",
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
"show_expr_info": "查看表达式信息",
|
||||
"find_usages": "查找使用",
|
||||
"delete_line": "删除当前行",
|
||||
"copy_line_up": "复制当前行到上一行",
|
||||
"copy_line_down": "复制当前行到下一行",
|
||||
"copy_lines_up": "复制到上方",
|
||||
"copy_lines_down": "复制到下方",
|
||||
"save_editor_file": "保存当前编辑器文件",
|
||||
"save_all_editors_files": "保存所有编辑器文件",
|
||||
"close_editor": "关闭当前编辑器",
|
||||
|
|
|
@ -74,8 +74,8 @@
|
|||
"show_expr_info": "查看表達式信息",
|
||||
"find_usages": "尋找使用",
|
||||
"delete_line": "删除當前行",
|
||||
"copy_line_up": "插入當前行到上一行",
|
||||
"copy_line_down": "插入當前行到下一行",
|
||||
"copy_lines_up": "複製到上方",
|
||||
"copy_lines_down": "複製到下方",
|
||||
"save_editor_file": "保存當前編輯器文件",
|
||||
"save_all_editors_files": "保存所有編輯器文件",
|
||||
"close_editor": "關閉當前編輯器",
|
||||
|
|
|
@ -628,26 +628,42 @@ var editors = {
|
|||
}
|
||||
},
|
||||
"Shift-Ctrl-Up": function (cm) {
|
||||
var cursor = cm.getCursor();
|
||||
var line = cursor.line;
|
||||
var content = cm.getLine(line);
|
||||
var content = '',
|
||||
selectoion = cm.listSelections()[0],
|
||||
cursor = cm.getCursor();
|
||||
|
||||
if (0 === line) {
|
||||
cm.replaceRange("", CodeMirror.Pos(0));
|
||||
line++;
|
||||
var from = selectoion.anchor.line,
|
||||
to = selectoion.head.line;
|
||||
if (from > to) {
|
||||
from = selectoion.head.line;
|
||||
to = selectoion.anchor.line;
|
||||
}
|
||||
|
||||
cm.replaceRange("\n" + content, CodeMirror.Pos(line - 1));
|
||||
for (var i = from, max = to; i <= max; i++) {
|
||||
content += '\n' + cm.getLine(i);
|
||||
}
|
||||
|
||||
cm.replaceRange(content, CodeMirror.Pos(to));
|
||||
cm.setCursor(cursor);
|
||||
},
|
||||
"Shift-Ctrl-Down": function (cm) {
|
||||
var cursor = cm.getCursor();
|
||||
var line = cursor.line;
|
||||
var content = cm.getLine(line);
|
||||
var content = '',
|
||||
selectoion = cm.listSelections()[0],
|
||||
cursor = cm.getCursor();
|
||||
|
||||
cm.replaceRange("\n", CodeMirror.Pos(line));
|
||||
cm.replaceRange(content, CodeMirror.Pos(line + 1));
|
||||
cm.setCursor(CodeMirror.Pos(line + 1, cursor.ch));
|
||||
var from = selectoion.anchor.line,
|
||||
to = selectoion.head.line;
|
||||
if (from > to) {
|
||||
from = selectoion.head.line;
|
||||
to = selectoion.anchor.line;
|
||||
}
|
||||
|
||||
for (var i = from, max = to; i <= max; i++) {
|
||||
content += '\n' + cm.getLine(i);
|
||||
}
|
||||
|
||||
cm.replaceRange(content, CodeMirror.Pos(to));
|
||||
cm.setCursor(CodeMirror.Pos(to + (to - from) + 1, cursor.ch));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<li>Alt-Shift-F{{.i18n.colon}}{{.i18n.format}}</li>
|
||||
<li>Ctrl-L{{.i18n.colon}}{{.i18n.goto_line}}</li>
|
||||
<li>Ctrl-E{{.i18n.colon}}{{.i18n.delete_line}}</li>
|
||||
<li>Shift-Ctrl-Up{{.i18n.colon}}{{.i18n.copy_line_up}}</li>
|
||||
<li>Shift-Ctrl-Down{{.i18n.colon}}{{.i18n.copy_line_down}}</li>
|
||||
<li>Shift-Ctrl-Up{{.i18n.colon}}{{.i18n.copy_lines_up}}</li>
|
||||
<li>Shift-Ctrl-Down{{.i18n.colon}}{{.i18n.copy_lines_down}}</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>
|
||||
|
|
Loading…
Reference in New Issue