1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
shylinux@163.com 2022-09-30 19:53:14 +08:00
parent 756d131cc8
commit 46b73fe181
3 changed files with 10 additions and 2 deletions

View File

@ -422,7 +422,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar
case "full": // no break
default: can.onimport.project(can, paths)
can.onengine.listen(can, "tabview.view.init", function() { var p = can.onsyntax[can.parse]
p && p.render && can.onaction[cli.SHOW]({}, can); if (can.page.ClassList.has(can, can._fields, chat.PLUGIN)) {
can.Option(nfs.PATH).indexOf("src/") == 0 && p && p.render && can.onaction[cli.SHOW]({}, can); if (can.page.ClassList.has(can, can._fields, chat.PLUGIN)) {
p && p.engine && can.onaction[cli.EXEC]({}, can)
}
})

View File

@ -173,6 +173,9 @@ Volcanos(chat.ONSYNTAX, {help: "语法高亮",
},
go: {
render: {},
prefix: {
"//": code.COMMENT,
},
keyword: {
"package": code.KEYWORD,
"import": code.KEYWORD,
@ -288,6 +291,8 @@ Volcanos(chat.ONSYNTAX, {help: "语法高亮",
"location": code.KEYWORD,
"null": code.CONSTANT,
"true": code.CONSTANT,
"false": code.CONSTANT,
"function": code.FUNCTION,
"Volcanos": code.FUNCTION,

View File

@ -144,6 +144,9 @@ Volcanos(chat.ONKEYMAP, {help: "键盘交互",
ArrowDown: shy("光标下移", function(event, can) { can.onaction.selectLine(event, can, can.current.next()) }),
ArrowUp: shy("光标上移", function(event, can) { can.onaction.selectLine(event, can, can.current.prev()) }),
s: shy("保存文件", function(event, can) { can.onaction.save(event, can, nfs.SAVE) }),
c: shy("编译项目", function(event, can) { can.onaction.compile(event, can, code.COMPILE) }),
".": shy("重复操作", function(event, can, target) { var cb = can.redo.pop(); cb && cb() }),
u: shy("撤销操作", function(event, can, target) { var cb = can.undo.pop(); cb && cb() }),
J: shy("合并两行", function(event, can, target) {
@ -429,7 +432,7 @@ Volcanos(chat.ONACTION, {help: "控件交互",
})
},
})
Volcanos(chat.ONEXPORT, {help: "导出数据", list: ["文件数", "模式", "按键", "解析器", "文件名", "当前行", "跳转数"]})
Volcanos(chat.ONEXPORT, {help: "导出数据", list: ["文件数", "模式", "解析器", "文件名", "当前行", "跳转数"]})
Volcanos(chat.ONPLUGIN, {help: "注册插件",
"can.code.vimer.keymap": shy("按键", {}, ["mode", "key", ice.LIST, ice.BACK], function(can, msg, cmds) {
can.core.Item(can.onkeymap._mode, function(mode, value) {