mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add vimer.css
This commit is contained in:
parent
1472a2fb4d
commit
116eea85b8
@ -203,6 +203,7 @@ fieldset.Action>div.output>fieldset.plugin:not(.float):not(.full):not(.cmd)>lege
|
|||||||
fieldset.auto, fieldset.full, fieldset.float, div.float { position:fixed; z-index:10; }
|
fieldset.auto, fieldset.full, fieldset.float, div.float { position:fixed; z-index:10; }
|
||||||
fieldset.plug { position:absolute; bottom:0; right:0; } fieldset.cmd fieldset.plug { position:fixed; bottom:32px; right:0; }
|
fieldset.plug { position:absolute; bottom:0; right:0; } fieldset.cmd fieldset.plug { position:fixed; bottom:32px; right:0; }
|
||||||
fieldset.plug div.output table.content { width:100%; }
|
fieldset.plug div.output table.content { width:100%; }
|
||||||
|
div.layout.flex>* { float:left; clear:none; }
|
||||||
div.output { position:relative; }
|
div.output { position:relative; }
|
||||||
div.tabs { position:relative; }
|
div.tabs { position:relative; }
|
||||||
div.tabs span.icon { margin-left:10px; visibility:hidden; }
|
div.tabs span.icon { margin-left:10px; visibility:hidden; }
|
||||||
@ -343,9 +344,6 @@ fieldset.plugin.parse.cmd>legend { display:none; }
|
|||||||
fieldset.plugin.parse.cmd>form.option { display:none; }
|
fieldset.plugin.parse.cmd>form.option { display:none; }
|
||||||
fieldset.plugin.parse.cmd>div.action { display:none; }
|
fieldset.plugin.parse.cmd>div.action { display:none; }
|
||||||
fieldset.plugin.parse.cmd>div.status { display:none; }
|
fieldset.plugin.parse.cmd>div.status { display:none; }
|
||||||
fieldset.plugin.inner.cmd>legend { display:none; }
|
|
||||||
fieldset.plugin.inner.cmd>div.action { display:none; }
|
|
||||||
fieldset.plugin.inner.cmd>form.option { display:none; }
|
|
||||||
fieldset.plan div.output div.content>table.content { height:100%; width:100%; }
|
fieldset.plan div.output div.content>table.content { height:100%; width:100%; }
|
||||||
fieldset.xterm div.layout div.output { border-left:gray solid 1px; border-top:gray solid 1px; }
|
fieldset.xterm div.layout div.output { border-left:gray solid 1px; border-top:gray solid 1px; }
|
||||||
fieldset.xterm div.layout div.output.select { border:blue solid 1px; }
|
fieldset.xterm div.layout div.output.select { border:blue solid 1px; }
|
||||||
@ -356,8 +354,6 @@ fieldset.draw.trend div.output svg { background-color:#1b5b738c; }
|
|||||||
fieldset.draw.spide div.output svg text { cursor:pointer; }
|
fieldset.draw.spide div.output svg text { cursor:pointer; }
|
||||||
fieldset.draw.spide div.output svg path { stroke-width:1; }
|
fieldset.draw.spide div.output svg path { stroke-width:1; }
|
||||||
fieldset.web.code.git.status>div.output table.content { width:100%; }
|
fieldset.web.code.git.status>div.output table.content { width:100%; }
|
||||||
fieldset.web.code.inner.cmd>div.output { overflow:hidden; }
|
|
||||||
fieldset.web.code.inner.cmd>div.status { display:none; }
|
|
||||||
fieldset.web.chat.iframe>div.output { overflow:hidden; }
|
fieldset.web.chat.iframe>div.output { overflow:hidden; }
|
||||||
fieldset.qrcode>div.output div.code { padding:0; }
|
fieldset.qrcode>div.output div.code { padding:0; }
|
||||||
fieldset.can.view { font-size:14px; }
|
fieldset.can.view { font-size:14px; }
|
||||||
|
@ -8,7 +8,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.onmotion.clear(can, can
|
|||||||
_size: function(can) { can.getActionSize(function(left, top, width, height) {
|
_size: function(can) { can.getActionSize(function(left, top, width, height) {
|
||||||
can.page.style(can, can._target, {left: left||0, top: top||0, width: width}), can.page.style(can, can._output, html.MAX_HEIGHT, height -= 2*html.PLUGIN_MARGIN+html.ACTION_HEIGHT+can.onexport.statusHeight(can))
|
can.page.style(can, can._target, {left: left||0, top: top||0, width: width}), can.page.style(can, can._output, html.MAX_HEIGHT, height -= 2*html.PLUGIN_MARGIN+html.ACTION_HEIGHT+can.onexport.statusHeight(can))
|
||||||
can.core.List([can.ui.content, can.ui.display], function(target) { can.page.style(can, target, html.MAX_WIDTH, can.ConfWidth(width-2*html.PLUGIN_MARGIN)) })
|
can.core.List([can.ui.content, can.ui.display], function(target) { can.page.style(can, target, html.MAX_WIDTH, can.ConfWidth(width-2*html.PLUGIN_MARGIN)) })
|
||||||
can.ConfHeight(can.base.Min(height-can.ui.content.offsetHeight-can.ui.display.offsetHeight-html.ACTION_HEIGHT-1, height/2))
|
can.ConfHeight(can.base.Min(height-can.ui.content.offsetHeight-can.ui.display.offsetHeight-html.ACTION_HEIGHT, height/2))
|
||||||
}) },
|
}) },
|
||||||
_input: function(can, msg, arg, fields) { if (can.base.contains(arg[1], ";")) { arg = can.core.Split(arg[1], "\t ;", "\t ;") }
|
_input: function(can, msg, arg, fields) { if (can.base.contains(arg[1], ";")) { arg = can.core.Split(arg[1], "\t ;", "\t ;") }
|
||||||
can.run(can.request({}, {fields: fields.join(ice.FS)}, msg), arg, function(res) { can.db.type = arg[0]
|
can.run(can.request({}, {fields: fields.join(ice.FS)}, msg), arg, function(res) { can.db.type = arg[0]
|
||||||
|
@ -2,83 +2,51 @@ fieldset.inner>form.option input[name=path] { width:80px; }
|
|||||||
fieldset.inner>form.option input[name=file] { width:160px; }
|
fieldset.inner>form.option input[name=file] { width:160px; }
|
||||||
fieldset.inner>div.output div.content { position:relative; }
|
fieldset.inner>div.output div.content { position:relative; }
|
||||||
fieldset.inner>div.output div.content td.text { height:20px; }
|
fieldset.inner>div.output div.content td.text { height:20px; }
|
||||||
fieldset.inner>div.output div.content td.text span.comment { color:green; }
|
fieldset.inner>div.output div.content td.text span.comment { color:darkgray; }
|
||||||
fieldset.inner>div.output div.content td.text span.keyword { color:yellow; }
|
fieldset.inner>div.output div.content td.text span.keyword { color:darkblue; }
|
||||||
fieldset.inner>div.output div.content td.text span.package { color:lightgreen; }
|
fieldset.inner>div.output div.content td.text span.package { color:blue; }
|
||||||
fieldset.inner>div.output div.content td.text span.datatype { color:cyan; }
|
fieldset.inner>div.output div.content td.text span.datatype { color:cornflowerblue; }
|
||||||
fieldset.inner>div.output div.content td.text span.function { color:lightgreen; }
|
fieldset.inner>div.output div.content td.text span.function { color:darkcyan; }
|
||||||
fieldset.inner>div.output div.content td.text span.constant { color:magenta; }
|
fieldset.inner>div.output div.content td.text span.constant { color:gray; }
|
||||||
fieldset.inner>div.output div.content td.text span.string { color:magenta; }
|
fieldset.inner>div.output div.content td.text span.string { color:brown; }
|
||||||
fieldset.inner>div.output div.content td.text span.object { color:cyan; }
|
fieldset.inner>div.output div.content td.text span.object { color:purple; }
|
||||||
fieldset.inner>div.output>div.project { width:230px; }
|
fieldset.inner>div.output>div.project { width:230px; }
|
||||||
fieldset.inner>div.output>div.project * { font-family:monospace; font-size:14px; outline:none; }
|
fieldset.inner>div.output>div.project * { font-family:monospace; font-size:14px; outline:none; }
|
||||||
fieldset.inner>div.output>div.project div.action { width:100%; }
|
fieldset.inner>div.output>div.project div.action { width:100%; }
|
||||||
fieldset.inner>div.output>div.project input[type=text] { box-shadow:none; }
|
fieldset.inner>div.output>div.project input[type=text] { box-shadow:none; }
|
||||||
fieldset.inner>div.output>div.project div.zone>div.item span.icon { font-size:20px; line-height:16px; width:20px; float:right; display:none; }
|
fieldset.inner>div.output>div.project div.zone>div.item span.icon { font-size:20px; line-height:16px; width:20px; float:right; display:none; }
|
||||||
fieldset.inner>div.output>div.project>div.zone>div.item span.icon { font-size:22px; line-height:32px; width:20px; float:right; display:none; }
|
|
||||||
fieldset.inner>div.output>div.project>div.zone:hover>div.item span.icon { display:block; }
|
|
||||||
fieldset.inner>div.output>div.project div.zone:hover>div.item span.icon { display:block; }
|
fieldset.inner>div.output>div.project div.zone:hover>div.item span.icon { display:block; }
|
||||||
|
fieldset.inner>div.output>div.project>div.zone>div.item span.icon { font-size:22px; line-height:32px; }
|
||||||
fieldset.inner>div.output>div.project>div.zone div.action>div.item { padding-right:0; width:100%; }
|
fieldset.inner>div.output>div.project>div.zone div.action>div.item { padding-right:0; width:100%; }
|
||||||
fieldset.inner>div.output>div.project>div.zone div.action>div.item>span.delete { top:3px; right:5px; }
|
|
||||||
fieldset.inner>div.output>div.project>div.zone div.action>div.item>input { width:100%; }
|
fieldset.inner>div.output>div.project>div.zone div.action>div.item>input { width:100%; }
|
||||||
|
fieldset.inner>div.output>div.project>div.zone div.action>div.item>span.delete { top:3px; right:5px; }
|
||||||
fieldset.inner>div.output>div.project>div.zone fieldset.plug { position:static; }
|
fieldset.inner>div.output>div.project>div.zone fieldset.plug { position:static; }
|
||||||
fieldset.inner>div.output>div.layout.flow>div.layout div.content * { font-family:monospace; font-size:14px; outline:none; }
|
fieldset.inner>div.output>div.layout>div.tabs { font-family:monospace; font-size:14px; display:none; }
|
||||||
fieldset.inner>div.output>div.layout.flow>div.tabs { font-family:monospace; font-size:14px; display:none; }
|
fieldset.inner>div.output>div.layout>div.path { font-family:monospace; font-size:14px; display:none; }
|
||||||
fieldset.inner>div.output>div.layout.flow>div.path { font-family:monospace; font-size:14px; display:none; }
|
fieldset.inner>div.output>div.layout>div.layout div.content * { font-family:monospace; font-size:14px; outline:none; }
|
||||||
fieldset.inner>div.output>div.layout.flow>div.display div.status>div { padding:5px; float:left; }
|
fieldset.inner>div.output>div.layout>div.layout>div.profile { max-width:unset; }
|
||||||
fieldset.inner>div.output>div.layout.flow>div.layout>div.profile div.status>div { padding:5px; float:left; }
|
fieldset.inner>div.output>div.layout>div.layout>div.profile div.status>div { padding:5px; float:left; }
|
||||||
fieldset.inner>div.output>div.layout.flow>div.layout>div.profile { max-width:unset; }
|
fieldset.inner>div.output>div.layout>div.display div.status>div { padding:5px; float:left; }
|
||||||
fieldset.inner>div.output>div.layout.flow { position:relative; }
|
|
||||||
fieldset.inner.cmd>div.output>div.project { border-right:dimgray solid 1px; }
|
|
||||||
fieldset.inner.cmd>div.output div.profile { border-left:dimgray solid 1px; }
|
|
||||||
fieldset.inner.cmd>div.output div.display { border-top:dimgray solid 1px; }
|
|
||||||
fieldset.inner.cmd>div.output>div.project>div.zone>div.item { font-style:italic; font-weight:bold; line-height:32px; }
|
fieldset.inner.cmd>div.output>div.project>div.zone>div.item { font-style:italic; font-weight:bold; line-height:32px; }
|
||||||
fieldset.inner.cmd>div.output>div.project>div.zone>div.item>span.icon { font-style:normal; font-weight:normal; line-height:32px; }
|
fieldset.inner.cmd>div.output>div.project>div.zone>div.item>span.icon { font-style:normal; font-weight:normal; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs { height:38px; display:block; overflow:hidden; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs { height:38px; display:block; overflow:hidden; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs.hide { display:none; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs.hide { display:none; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div { padding:10px; height:38px; float:left; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div { padding:10px; height:38px; float:left; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div.icon { font-size:18px; line-height:32px; padding:2px 5px; position:sticky; top:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.icon { font-size:18px; line-height:32px; padding:2px 5px; position:sticky; top:0; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div.tabs>span { font-style:italic; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs>span { font-style:italic; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div.tabs>span.icon { padding:0 5px; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.tabs>span.icon { padding:0 5px; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div.usernick { float:right; position:sticky; top:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.usernick { float:right; position:sticky; top:0; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div.avatar { padding:0; height:38px; float:right; position:sticky; top:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.avatar { padding:0; height:38px; float:right; position:sticky; top:0; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div.avatar>img { height:38px; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.avatar>img { height:38px; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.tabs>div.time { float:right; position:sticky; top:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.tabs>div.time { float:right; position:sticky; top:0; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path { font-style:italic; padding:5px; display:block; }
|
fieldset.inner.cmd>div.output>div.layout>div.path { font-style:italic; padding:5px; display:block; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path.hide { display:none; }
|
fieldset.inner.cmd>div.output>div.layout>div.path.hide { display:none; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path span.func { padding:5px 10px; margin-left:20px; }
|
fieldset.inner.cmd>div.output>div.layout>div.path span.func { padding:5px 10px; margin-left:20px; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path span.mode { padding:5px 10px; margin-left:20px; cursor:pointer; }
|
fieldset.inner.cmd>div.output>div.layout>div.path span.mode { padding:5px 10px; margin-left:20px; cursor:pointer; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.path span.view { font-size:22px; line-height:12px; padding:0 4px; float:right; cursor:pointer; }
|
fieldset.inner.cmd>div.output>div.layout>div.path span.view { font-size:22px; line-height:12px; padding:0 4px; float:right; cursor:pointer; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.plug { height:32px; clear:both; position:fixed; bottom:0; right:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.plug { height:32px; clear:both; position:fixed; bottom:0; right:0; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.plug>legend { font-size:1rem; padding:0 10px; float:right; }
|
fieldset.inner.cmd>div.output>div.layout>div.plug>legend { font-size:1rem; padding:0 10px; float:right; }
|
||||||
fieldset.inner.cmd>div.output>div.layout.flow>div.display>div.status { position:sticky; bottom:0; }
|
fieldset.inner.cmd>div.output>div.layout>div.display>div.status { position:sticky; bottom:0; }
|
||||||
|
|
||||||
body.zh fieldset.inner>div.output>div.project>div.zone>div.item { letter-spacing:10px; }
|
|
||||||
body.black fieldset.inner>div.output div.content td.text span.comment { background-color:blue; color:cyan; }
|
|
||||||
body.white fieldset.inner.cmd>div.output { background-color:aliceblue; }
|
|
||||||
body.white fieldset.inner.cmd>div.output div.content { background-color:white; }
|
|
||||||
body.white fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div.select { background-color:white; }
|
|
||||||
body.white fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div:hover { background-color:white; }
|
|
||||||
body.white fieldset.inner.cmd>div.output>div.layout.flow>div.path { background-color:white; }
|
|
||||||
body.white fieldset.inner>div.output div.content tr:hover { background-color:aliceblue; }
|
|
||||||
body.white fieldset.inner>div.output div.content tr.select { background-color:aliceblue; }
|
|
||||||
body.white fieldset.inner>div.output div.content tr.select td.line { background-color:steelblue; color:white; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.comment { color:darkgray; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.keyword { color:blue; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.package { color:brown; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.datatype { color:darkgreen; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.function { color:green; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.constant { color:brown; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.string { color:royalblue; }
|
|
||||||
body.white fieldset.inner>div.output div.content td.text span.object { color:darkcyan; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.comment { color:darkgray; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.keyword { color:darkblue; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.package { color:blue; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.datatype { color:cornflowerblue; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.function { color:darkcyan; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.constant { color:gray; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.string { color:brown; }
|
|
||||||
body.light fieldset.inner>div.output div.content td.text span.object { color:purple; }
|
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.comment { color:green; }
|
body.dark fieldset.inner>div.output div.content td.text span.comment { color:green; }
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.keyword { color:royalblue; }
|
body.dark fieldset.inner>div.output div.content td.text span.keyword { color:royalblue; }
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.datatype { color:lavender; }
|
body.dark fieldset.inner>div.output div.content td.text span.datatype { color:lavender; }
|
||||||
@ -86,33 +54,34 @@ body.dark fieldset.inner>div.output div.content td.text span.function { color:li
|
|||||||
body.dark fieldset.inner>div.output div.content td.text span.constant { color:gray; }
|
body.dark fieldset.inner>div.output div.content td.text span.constant { color:gray; }
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.string { color:orange; }
|
body.dark fieldset.inner>div.output div.content td.text span.string { color:orange; }
|
||||||
body.dark fieldset.inner>div.output div.content td.text span.object { color:silver; }
|
body.dark fieldset.inner>div.output div.content td.text span.object { color:silver; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.comment { background-color:blue; color:cyan; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.keyword { color:yellow; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.package { color:lightgreen; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.datatype { color:cyan; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.function { color:lightgreen; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.constant { color:magenta; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.string { color:magenta; }
|
||||||
|
body.black fieldset.inner>div.output div.content td.text span.object { color:cyan; }
|
||||||
|
body.white fieldset.inner.cmd>div.output { background-color:aliceblue; }
|
||||||
|
body.white fieldset.inner.cmd>div.output div.content { background-color:white; }
|
||||||
|
body.white fieldset.inner.cmd>div.output>div.layout>div.tabs div.select { background-color:white; }
|
||||||
|
body.white fieldset.inner.cmd>div.output>div.layout>div.tabs div:hover { background-color:white; }
|
||||||
|
body.white fieldset.inner.cmd>div.output>div.layout>div.path { background-color:white; }
|
||||||
|
body.white fieldset.inner>div.output div.content tr:hover { background-color:aliceblue; }
|
||||||
|
body.white fieldset.inner>div.output div.content tr.select { background-color:aliceblue; }
|
||||||
|
body.white fieldset.inner>div.output div.content tr.select td.line { background-color:steelblue; color:white; }
|
||||||
body.mobile fieldset.inner>form.option input[name=file] { width:90px; }
|
body.mobile fieldset.inner>form.option input[name=file] { width:90px; }
|
||||||
body.mobile fieldset.word fieldset.inner>form.option input[type=text] { display:none; }
|
body.mobile fieldset.word fieldset.inner>form.option input[type=text] { display:none; }
|
||||||
|
body.zh fieldset.inner>div.output>div.project>div.zone>div.item { letter-spacing:10px; }
|
||||||
div.carte.history.float * { tab-size:2; }
|
|
||||||
div.vimer.open.float td:first-child { display:none; }
|
|
||||||
div.path span.item { padding:5px; }
|
div.path span.item { padding:5px; }
|
||||||
div.carte.path.float { font-size:14px; border-radius:0; } div.carte.path.float div.item { padding:5px; }
|
div.carte.path.float { font-size:14px; border-radius:0; } div.carte.path.float div.item { padding:5px; }
|
||||||
div.carte.cmd.float { font-size:14px; border-radius:0; } div.cmd.path.float div.item { padding:5px; }
|
div.carte.cmd.float { font-size:14px; border-radius:0; } div.cmd.path.float div.item { padding:5px; }
|
||||||
|
div.vimer.open.float td:first-child { display:none; }
|
||||||
|
tr.line>td.line { user-select:none; }
|
||||||
|
tr.line>td.line { text-align:right; padding:0 10px; position:sticky; left:0; }
|
||||||
|
tr.line>td.text { line-height:20px; white-space:pre; padding-left:10px; cursor:text; }
|
||||||
tr.line.delete { background-color:#ff000036; color:gray; }
|
tr.line.delete { background-color:#ff000036; color:gray; }
|
||||||
tr.line.insert { background-color:#00800036; }
|
tr.line.insert { background-color:#00800036; }
|
||||||
fieldset.inner>div.output>div.project div.item.modify { background-color:#00800036; }
|
fieldset.inner>div.output>div.project div.item.modify { background-color:#00800036; }
|
||||||
tr.line>td.line { text-align:right; padding:0 10px; position:sticky; left:0; }
|
|
||||||
tr.line>td.text { line-height:20px; white-space:pre; padding-left:10px; cursor:text; }
|
|
||||||
body.white tr.line.select { background-color:dimgray; } body.white tr.line:hover { background-color:dimgray; }
|
|
||||||
body.black tr.line.select { background-color:darkblue; } body.black tr.line:hover { background-color:darkblue; }
|
body.black tr.line.select { background-color:darkblue; } body.black tr.line:hover { background-color:darkblue; }
|
||||||
tr.line>td.line { -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; -o-user-select:none; user-select:none; }
|
body.white tr.line.select { background-color:dimgray; } body.white tr.line:hover { background-color:dimgray; }
|
||||||
|
|
||||||
div.layout.flex>* { float:left; clear:none; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout>div.layout div.content { border-left:gray solid 1px; border-top:gray solid 1px; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout div.content div.tips { color:gray; font-style:italic; position:absolute; right:0; top:0; }
|
|
||||||
|
|
||||||
/* focus */
|
|
||||||
fieldset.inner>div.output>div.layout>div.path span.mode.normal { background-color:blue; color:white; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.path span.mode.insert { background-color:red; color:white; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout>div.layout div.content.insert.select { border:red solid 1px; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout>div.layout div.content.normal.select { border:blue solid 1px; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout div.content.normal tr.line.select>td.line { background-color:blue; color:white; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout div.content.insert tr.line.select>td.line { background-color:red; color:white; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout div.content.insert input:not([type=button]):focus { border:red solid 1px; }
|
|
||||||
fieldset.inner>div.output>div.layout>div.layout div.content.plugin input:not([type=button]):hover { border:none }
|
|
||||||
|
@ -15,6 +15,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp
|
|||||||
case chat.FLOAT: can.onmotion.hidden(can, can.ui.project); break
|
case chat.FLOAT: can.onmotion.hidden(can, can.ui.project); break
|
||||||
case chat.CMD: can.misc.sessionStorage(can, PROJECT_HIDE) == html.HIDE && can.onmotion.hidden(can, can.ui.project)
|
case chat.CMD: can.misc.sessionStorage(can, PROJECT_HIDE) == html.HIDE && can.onmotion.hidden(can, can.ui.project)
|
||||||
if (can.misc.sessionStorage(can, TABVIEW_HIDE) == html.HIDE) { can.onmotion.hidden(can, can.ui.project), can.onmotion.hidden(can, can.ui.tabs) }
|
if (can.misc.sessionStorage(can, TABVIEW_HIDE) == html.HIDE) { can.onmotion.hidden(can, can.ui.project), can.onmotion.hidden(can, can.ui.tabs) }
|
||||||
|
can.onappend.style(can, html.OUTPUT)
|
||||||
case chat.FULL: // no break
|
case chat.FULL: // no break
|
||||||
default: can.user.isMobile && can.onmotion.hidden(can, can.ui.project), can.onimport.project(can, paths), can.onimport._tabs(can)
|
default: can.user.isMobile && can.onmotion.hidden(can, can.ui.project), can.onimport.project(can, paths), can.onimport._tabs(can)
|
||||||
} var args = can.misc.SearchHash(can)
|
} var args = can.misc.SearchHash(can)
|
||||||
@ -203,12 +204,9 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp
|
|||||||
can.onimport.tabview(can, item.path, can.base.trimPrefix(item.file, nfs.PWD), parseInt(item.line)); return true
|
can.onimport.tabview(can, item.path, can.base.trimPrefix(item.file, nfs.PWD), parseInt(item.line)); return true
|
||||||
}, can.base.isFunc(cb) && cb(sub) }, can.ui.plug.parentNode, can.ui.plug), can.page.isDisplay(can.ui.plug) || can.onmotion.toggle(can, can.ui.plug, true) && can.onimport.layout(can)
|
}, can.base.isFunc(cb) && cb(sub) }, can.ui.plug.parentNode, can.ui.plug), can.page.isDisplay(can.ui.plug) || can.onmotion.toggle(can, can.ui.plug, true) && can.onimport.layout(can)
|
||||||
},
|
},
|
||||||
layout: function(can) { if (can.isSimpleMode()) { return can.page.style(can, can.ui.content, html.WIDTH, can.ConfWidth()) }
|
layout: function(can) { if (can.isSimpleMode()) { return can.page.style(can, can.ui.content, html.WIDTH, can.ConfWidth()) } if (can.isCmdMode()) { can.ConfHeight(can.page.height()), can.ConfWidth(can.page.width()) }
|
||||||
if (can.isCmdMode()) { can.ConfHeight(can.page.height()), can.ConfWidth(can.page.width()) }
|
var content = can.ui.content; if (content._root) { can.ui.content = content._root } can.ui.size = {profile: can._msg.Option(html.WIDTH), display: can._msg.Option(html.HEIGHT)}
|
||||||
var content = can.ui.content; if (content._root) { can.ui.content = content._root }
|
can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) { can.ui.content = content, can.onlayout.layout(can, height, width)
|
||||||
can.ui.size = {profile: can._msg.Option(html.WIDTH), display: can._msg.Option(html.HEIGHT)}
|
|
||||||
can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) {
|
|
||||||
can.ui.content = content, can.onlayout.layout(can, height, width)
|
|
||||||
var sub = can.ui.profile._plugin; sub && can.page.isDisplay(can.ui.profile) && sub.onimport.size(sub, can.ui.profile.offsetHeight, can.ui.profileWidth, true)
|
var sub = can.ui.profile._plugin; sub && can.page.isDisplay(can.ui.profile) && sub.onimport.size(sub, can.ui.profile.offsetHeight, can.ui.profileWidth, true)
|
||||||
var sub = can.ui.content._plugin; if (!sub) { return } if (height == sub.ConfHeight()+sub.onexport.actionHeight(sub)+sub.onexport.statusHeight(sub) && width == sub.ConfWidth()) { return }
|
var sub = can.ui.content._plugin; if (!sub) { return } if (height == sub.ConfHeight()+sub.onexport.actionHeight(sub)+sub.onexport.statusHeight(sub) && width == sub.ConfWidth()) { return }
|
||||||
content._root || sub.onimport.size(sub, height, width, true), can.onlayout.layout(can)
|
content._root || sub.onimport.size(sub, height, width, true), can.onlayout.layout(can)
|
||||||
@ -477,22 +475,21 @@ Volcanos(chat.ONACTION, {
|
|||||||
}
|
}
|
||||||
}), cb(msg) }}, target)
|
}), cb(msg) }}, target)
|
||||||
}
|
}
|
||||||
|
function grep(value, file, path) { var arg = can.core.List(arguments); can.onimport.exts(can, "inner/search.js", function(sub) {
|
||||||
|
can.page.isDisplay(sub._target) || (sub._delay_init = false, sub.select())
|
||||||
|
sub.runAction(can.request({}, {value: value}), nfs.GREP, arg)
|
||||||
|
}) }
|
||||||
var meta = can.onappend._action(can, [
|
var meta = can.onappend._action(can, [
|
||||||
{type: html.TEXT, name: nfs.FROM, style: {width: 200}, _init: function(target) { from = target, complete(target, nfs.FIND), can.onmotion.delay(can, function() { target.focus() }) }},
|
{type: html.TEXT, name: nfs.FROM, style: {width: 200}, _init: function(target) { from = target, complete(target, nfs.FIND), can.onmotion.delay(can, function() { target.focus() }) }},
|
||||||
{type: html.BUTTON, name: nfs.FIND}, {type: html.BUTTON, name: nfs.GREP}, {type: html.TEXT, name: nfs.TO, _init: function(target) { to = target, complete(target, nfs.REPLACE) }},
|
{type: html.BUTTON, name: nfs.FIND}, {type: html.BUTTON, name: nfs.GREP}, {type: html.TEXT, name: nfs.TO, _init: function(target) { to = target, complete(target, nfs.REPLACE) }},
|
||||||
{type: html.BUTTON, name: nfs.REPLACE}, {type: html.BUTTON, name: cli.CLOSE},
|
{type: html.BUTTON, name: nfs.REPLACE}, {type: html.BUTTON, name: cli.CLOSE},
|
||||||
], ui.action, {_trans: {find: "查找", grep: "搜索", replace: "替换"},
|
], ui.action, {_trans: {find: "查找", grep: "搜索", replace: "替换"},
|
||||||
find: function() { find(last+1, from.value), can.onimport.exts(can, "inner/search.js", function(sub) {
|
find: function() { grep(from.value, can.Option(nfs.FILE), can.Option(nfs.PATH)), find(last+1, from.value) },
|
||||||
can.page.isDisplay(sub._target) || (sub._delay_init = false, sub.select()), meta.close()
|
grep: function() { grep(from.value, nfs.PT, can.Option(nfs.PATH)) },
|
||||||
sub.runAction(can.request(event, {value: from.value}), nfs.GREP, [from.value, can.Option(nfs.FILE), can.Option(nfs.PATH)])
|
|
||||||
}) },
|
|
||||||
grep: function() { can.onimport.exts(can, "inner/search.js", function(sub) {
|
|
||||||
can.page.isDisplay(sub._target) || (sub._delay_init = false, sub.select()), meta.close()
|
|
||||||
sub.runAction(can.request(event, {value: from.value}), nfs.GREP, [from.value, nfs.PT, can.Option(nfs.PATH)])
|
|
||||||
}) },
|
|
||||||
replace: function() { var text = can.current.text(), line = can.onexport.line(can, can.current.line)
|
replace: function() { var text = can.current.text(), line = can.onexport.line(can, can.current.line)
|
||||||
can.db.undo.push(function() { can.onaction.selectLine(can, line), can.onaction.modifyLine(can, line, text) })
|
can.db.undo.push(function() { can.onaction.selectLine(can, line), can.onaction.modifyLine(can, line, text) })
|
||||||
can.current.text(text.replace(from.value, to.value)), can.current.text().indexOf(from.value) == -1 && meta.find()
|
grep(from.value, can.Option(nfs.FILE), can.Option(nfs.PATH))
|
||||||
|
can.current.text(text.replace(from.value, to.value)), can.current.text().indexOf(from.value) == -1, find(last+1, from.value)
|
||||||
}, close: function() { can.page.Remove(can, ui._target) },
|
}, close: function() { can.page.Remove(can, ui._target) },
|
||||||
}); var from, to
|
}); var from, to
|
||||||
},
|
},
|
||||||
@ -511,7 +508,7 @@ Volcanos(chat.ONACTION, {
|
|||||||
can.db._key_list = can.onkeymap._parse(event, can, mdb.PLUGIN, can.db._key_list, can.ui.content)
|
can.db._key_list = can.onkeymap._parse(event, can, mdb.PLUGIN, can.db._key_list, can.ui.content)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONEXPORT, {list: [mdb.COUNT, mdb.TYPE, nfs.FILE, nfs.LINE, ice.BACK],
|
Volcanos(chat.ONEXPORT, {list: [nfs.FILE, nfs.LINE, ice.BACK],
|
||||||
size: function(can, size, full) { if (size > 1) { return size } if (size > 0) { return size*full } },
|
size: function(can, size, full) { if (size > 1) { return size } if (size > 0) { return size*full } },
|
||||||
keys: function(can, path, file) { return [path||can.Option(nfs.PATH), file||can.Option(nfs.FILE)].join(nfs.DF) },
|
keys: function(can, path, file) { return [path||can.Option(nfs.PATH), file||can.Option(nfs.FILE)].join(nfs.DF) },
|
||||||
line: function(can, line) { return parseInt(can.core.Value(can.page.SelectOne(can, line, "td.line"), "innerText")) },
|
line: function(can, line) { return parseInt(can.core.Value(can.page.SelectOne(can, line, "td.line"), "innerText")) },
|
||||||
@ -527,7 +524,7 @@ Volcanos(chat.ONEXPORT, {list: [mdb.COUNT, mdb.TYPE, nfs.FILE, nfs.LINE, ice.BAC
|
|||||||
return [ls.slice(0, 1).join(nfs.PS)+nfs.PS, ls.slice(1).join(nfs.PS)]
|
return [ls.slice(0, 1).join(nfs.PS)+nfs.PS, ls.slice(1).join(nfs.PS)]
|
||||||
},
|
},
|
||||||
hash: function(can) { return can.misc.SearchHash(can, can.Option(nfs.PATH), can.Option(nfs.FILE), can.Option(nfs.LINE)) },
|
hash: function(can) { return can.misc.SearchHash(can, can.Option(nfs.PATH), can.Option(nfs.FILE), can.Option(nfs.LINE)) },
|
||||||
func: function(can) { var p = can.onsyntax[can.db.parse]||{}, opts = {}
|
func: function(can) { var p = can.onsyntax[can.base.Ext(can.Option(nfs.FILE))]||{}, opts = {}
|
||||||
function indent(text) { var indent = 0; for (var i = 0; i < text.length; i++) { switch (text[i]) {
|
function indent(text) { var indent = 0; for (var i = 0; i < text.length; i++) { switch (text[i]) {
|
||||||
case lex.TB: indent+=4; break
|
case lex.TB: indent+=4; break
|
||||||
case lex.SP: indent++; break
|
case lex.SP: indent++; break
|
||||||
|
@ -180,6 +180,7 @@ Volcanos(chat.ONSYNTAX, {
|
|||||||
},
|
},
|
||||||
}, mod: {prefix: {"//": code.COMMENT}, keyword: {"go": code.KEYWORD, "module": code.KEYWORD, "require": code.KEYWORD, "replace": code.KEYWORD}}, sum: {},
|
}, mod: {prefix: {"//": code.COMMENT}, keyword: {"go": code.KEYWORD, "module": code.KEYWORD, "require": code.KEYWORD, "replace": code.KEYWORD}}, sum: {},
|
||||||
js: {prefix: {"// ": code.COMMENT}, regexp: {"[A-Z_0-9]+": code.CONSTANT}, keyword: {
|
js: {prefix: {"// ": code.COMMENT}, regexp: {"[A-Z_0-9]+": code.CONSTANT}, keyword: {
|
||||||
|
|
||||||
"var": code.KEYWORD, "function": code.KEYWORD, "typeof": code.KEYWORD, "const": code.KEYWORD, "new": code.KEYWORD, "delete": code.KEYWORD,
|
"var": code.KEYWORD, "function": code.KEYWORD, "typeof": code.KEYWORD, "const": code.KEYWORD, "new": code.KEYWORD, "delete": code.KEYWORD,
|
||||||
"if": code.KEYWORD, "else": code.KEYWORD,
|
"if": code.KEYWORD, "else": code.KEYWORD,
|
||||||
"for": code.KEYWORD, "in": code.KEYWORD, "while": code.KEYWORD, "break": code.KEYWORD, "continue": code.KEYWORD,
|
"for": code.KEYWORD, "in": code.KEYWORD, "while": code.KEYWORD, "break": code.KEYWORD, "continue": code.KEYWORD,
|
||||||
@ -188,7 +189,6 @@ Volcanos(chat.ONSYNTAX, {
|
|||||||
|
|
||||||
"true": code.CONSTANT, "false": code.CONSTANT, "null": code.CONSTANT, "undefined": code.CONSTANT,
|
"true": code.CONSTANT, "false": code.CONSTANT, "null": code.CONSTANT, "undefined": code.CONSTANT,
|
||||||
"Array": code.DATATYPE, "JSON": code.DATATYPE, "Date": code.DATATYPE, "Math": code.DATATYPE, "XMLHttpRequest": code.DATATYPE, "WebSocket": code.DATATYPE,
|
"Array": code.DATATYPE, "JSON": code.DATATYPE, "Date": code.DATATYPE, "Math": code.DATATYPE, "XMLHttpRequest": code.DATATYPE, "WebSocket": code.DATATYPE,
|
||||||
"event": code.OBJECT, "target": code.OBJECT,
|
|
||||||
"window": code.OBJECT, "console": code.OBJECT, "navigator": code.OBJECT,
|
"window": code.OBJECT, "console": code.OBJECT, "navigator": code.OBJECT,
|
||||||
"location": code.OBJECT, "history": code.OBJECT, "document": code.OBJECT,
|
"location": code.OBJECT, "history": code.OBJECT, "document": code.OBJECT,
|
||||||
"arguments": code.OBJECT, "callee": code.OBJECT, "this": code.OBJECT,
|
"arguments": code.OBJECT, "callee": code.OBJECT, "this": code.OBJECT,
|
||||||
@ -200,10 +200,16 @@ Volcanos(chat.ONSYNTAX, {
|
|||||||
"concat": code.FUNCTION, "reverse": code.FUNCTION, "slice": code.FUNCTION, "join": code.FUNCTION, "sort": code.FUNCTION, "push": code.FUNCTION, "pop": code.FUNCTION,
|
"concat": code.FUNCTION, "reverse": code.FUNCTION, "slice": code.FUNCTION, "join": code.FUNCTION, "sort": code.FUNCTION, "push": code.FUNCTION, "pop": code.FUNCTION,
|
||||||
"stringify": code.FUNCTION, "parse": code.FUNCTION,
|
"stringify": code.FUNCTION, "parse": code.FUNCTION,
|
||||||
|
|
||||||
"Volcanos": code.FUNCTION, "shy": code.FUNCTION, "cbs": code.FUNCTION, "cb": code.FUNCTION,
|
|
||||||
"kit": code.PACKAGE, "ice": code.PACKAGE,
|
"kit": code.PACKAGE, "ice": code.PACKAGE,
|
||||||
"can": code.OBJECT, "sub": code.OBJECT, "sup": code.OBJECT,
|
"can": code.OBJECT, "msg": code.OBJECT, "cb": code.FUNCTION, "target": code.OBJECT, "event": code.OBJECT,
|
||||||
"msg": code.OBJECT, "res": code.OBJECT,
|
"Volcanos": code.FUNCTION, "shy": code.FUNCTION, "cbs": code.FUNCTION,
|
||||||
|
"res": code.OBJECT, "sub": code.OBJECT, "sup": code.OBJECT,
|
||||||
|
},
|
||||||
|
complete: function(event, can, msg, target, pre, key) {
|
||||||
|
var ls = can.core.Split(can.core.Split(pre, "\t {(:,)}").pop(), ice.PT), list = {can: can, msg: msg, target: target, event: event, window: window}
|
||||||
|
can.core.ItemKeys(key == ""? list: can.core.Value(list, ls)||can.core.Value(window, ls)||window, function(k, v) {
|
||||||
|
msg.Push(mdb.NAME, k).Push(mdb.TEXT, (v+"").split(ice.NL)[0])
|
||||||
|
})
|
||||||
},
|
},
|
||||||
func: function(can, push, text, indent, opts) { var ls = can.core.Split(text, "\t (,", ice.DF)
|
func: function(can, push, text, indent, opts) { var ls = can.core.Split(text, "\t (,", ice.DF)
|
||||||
if (indent == 0 && can.base.beginWith(text, "Volcanos")) {
|
if (indent == 0 && can.base.beginWith(text, "Volcanos")) {
|
||||||
|
@ -1,17 +1,23 @@
|
|||||||
fieldset.vimer>div.output div.project div.zone.recent>div.list { max-height:200px; }
|
fieldset.vimer>div.output>div.project>div.zone.space div.item.stop { color:gray; }
|
||||||
fieldset.vimer>div.output div.project div.zone.space div.item.stop { color:gray; }
|
fieldset.vimer>div.output>div.layout>div.path span.mode.normal { background-color:blue; color:white; }
|
||||||
fieldset.vimer>div.output input.current { background-color:transparent; color:transparent; padding-left:10px; height:20px; position:absolute; }
|
fieldset.vimer>div.output>div.layout>div.path span.mode.insert { background-color:red; color:white; }
|
||||||
fieldset.vimer>div.output div.complete { background-color:unset; padding-top:0; display:none; overflow:auto; position:absolute; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content input.current { background-color:transparent; color:transparent; padding-left:10px; height:20px; position:absolute; }
|
||||||
fieldset.vimer>div.output div.complete div.prefix { color:transparent; white-space:pre; float:left; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete { background-color:unset; padding-top:0; display:none; overflow:auto; position:absolute; }
|
||||||
fieldset.vimer>div.output div.complete table.content thead { display:none; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete div.prefix { color:transparent; white-space:pre; float:left; }
|
||||||
fieldset.vimer>div.output div.complete table.content { width:unset; max-width:600px; display:block; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content thead { display:none; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content { padding-left:5px; width:unset; max-width:600px; display:block; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content.insert div.complete:not(.hide) { display:block; top:unset; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content.insert div.complete:not(.hide) { display:block; top:unset; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.tips { color:gray; font-style:italic; position:absolute; right:0; top:0; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content { border-left:gray solid 1px; border-top:gray solid 1px; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content.normal.select { border:blue solid 1px; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout>div.layout div.content.insert.select { border:red solid 1px; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout div.content.normal tr.line.select>td.line { background-color:blue; color:white; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout div.content.insert tr.line.select>td.line { background-color:red; color:white; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout div.content.normal input:not([type=button]) { border:blue solid 1px; }
|
||||||
|
fieldset.vimer>div.output>div.layout>div.layout div.content.insert input:not([type=button]) { border:red solid 1px; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content.normal input.current { caret-color:lightgray; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content.normal input.current { caret-color:lightgray; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content.insert input.current { caret-color:black; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content.insert input.current { caret-color:black; }
|
||||||
body.dark fieldset.vimer>div.output>div.layout>div.layout div.content.normal input.current { caret-color:gray; }
|
body.dark fieldset.vimer>div.output>div.layout>div.layout div.content.normal input.current { caret-color:gray; }
|
||||||
body.dark fieldset.vimer>div.output>div.layout>div.layout div.content.insert input.current { caret-color:yellow; }
|
body.dark fieldset.vimer>div.output>div.layout>div.layout div.content.insert input.current { caret-color:yellow; }
|
||||||
body.black fieldset.vimer>div.output>div.layout>div.layout div.content.normal input.current { caret-color:gray; }
|
body.black fieldset.vimer>div.output>div.layout>div.layout div.content.normal input.current { caret-color:gray; }
|
||||||
body.black fieldset.vimer>div.output>div.layout>div.layout div.content.insert input.current { caret-color:yellow; }
|
body.black fieldset.vimer>div.output>div.layout>div.layout div.content.insert input.current { caret-color:yellow; }
|
||||||
|
|
||||||
div.input.vimer.source.create.float td:first-child { display:none; }
|
|
||||||
|
|
@ -34,7 +34,7 @@ Volcanos(chat.ONFIGURE, {
|
|||||||
mdb.CREATE, function(event, button) { can.Update(can.request(event, {path: path+item.path}), [ctx.ACTION, nfs.SCRIPT], function(msg) { show(target, zone, path) }) },
|
mdb.CREATE, function(event, button) { can.Update(can.request(event, {path: path+item.path}), [ctx.ACTION, nfs.SCRIPT], function(msg) { show(target, zone, path) }) },
|
||||||
nfs.TRASH, function(event, button) { can.runAction(event, nfs.TRASH, [path+item.path], function(msg) { show(target, zone, path) }) },
|
nfs.TRASH, function(event, button) { can.runAction(event, nfs.TRASH, [path+item.path], function(msg) { show(target, zone, path) }) },
|
||||||
)); return item
|
)); return item
|
||||||
}); cache = can.onimport.tree(can, list, nfs.PATH, ice.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target, cache)
|
}); cache = can.onimport.tree(can, list, nfs.PATH, nfs.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target, cache)
|
||||||
}, true) } if (path.length == 1) { return show(target, zone, path[0]) } can.page.Remove(can, zone._action)
|
}, true) } if (path.length == 1) { return show(target, zone, path[0]) } can.page.Remove(can, zone._action)
|
||||||
can.onimport.zone(can, can.core.List(path, function(path) { return kit.Dict(mdb.NAME, path, path == args[0]? chat._INIT: chat._DELAY_INIT, function(target, zone) { show(target, zone, path) }) }), target)
|
can.onimport.zone(can, can.core.List(path, function(path) { return kit.Dict(mdb.NAME, path, path == args[0]? chat._INIT: chat._DELAY_INIT, function(target, zone) { show(target, zone, path) }) }), target)
|
||||||
},
|
},
|
||||||
@ -57,7 +57,7 @@ Volcanos(chat.ONFIGURE, {
|
|||||||
case nfs.FILE: var ls = can.onexport.split(can, item.text); can.onimport.tabview(can, ls[0], ls[1]); break
|
case nfs.FILE: var ls = can.onexport.split(can, item.text); can.onimport.tabview(can, ls[0], ls[1]); break
|
||||||
case mdb.LINK: can.onimport.tabview(can, "", item.text, web.SPACE); break
|
case mdb.LINK: can.onimport.tabview(can, "", item.text, web.SPACE); break
|
||||||
case ctx.INDEX: can.onimport.tabview(can, "", item.text, ctx.INDEX); break
|
case ctx.INDEX: can.onimport.tabview(can, "", item.text, ctx.INDEX); break
|
||||||
case ssh.SHELL: can.onimport.tabview(can, "", [web.CODE_XTERM, item.text].join(ice.FS), ctx.INDEX); break
|
case ssh.SHELL: can.onimport.tabview(can, "", [web.CODE_XTERM, item.text].join(mdb.FS), ctx.INDEX); break
|
||||||
case cli.OPENS: can.runAction(event, cli.OPENS, [item.text]); break
|
case cli.OPENS: can.runAction(event, cli.OPENS, [item.text]); break
|
||||||
} }
|
} }
|
||||||
}) },
|
}) },
|
||||||
@ -70,7 +70,7 @@ Volcanos(chat.ONACTION, {list: ["编译", "变更", "源码", "终端", "导图"
|
|||||||
can.user.input(event, can, meta.feature[button], function(args) { can.onaction._run(event, can, button, args, cb) })
|
can.user.input(event, can, meta.feature[button], function(args) { can.onaction._run(event, can, button, args, cb) })
|
||||||
},
|
},
|
||||||
save: function(event, can, button) { can.request(event, {file: can.Option(nfs.FILE), content: can.onexport.content(can)})
|
save: function(event, can, button) { can.request(event, {file: can.Option(nfs.FILE), content: can.onexport.content(can)})
|
||||||
function imports(str) { var block = "", count = 0; can.core.List(str.split(ice.NL), function(item) {
|
function imports(str) { var block = "", count = 0; can.core.List(str.split(lex.NL), function(item) {
|
||||||
if (can.base.beginWith(item, "import (")) { block = can.core.Split(item)[0]; return }
|
if (can.base.beginWith(item, "import (")) { block = can.core.Split(item)[0]; return }
|
||||||
if (can.base.beginWith(item, ")")) { block = ""; return }
|
if (can.base.beginWith(item, ")")) { block = ""; return }
|
||||||
if (can.base.beginWith(item, "import ")) { count++; return }
|
if (can.base.beginWith(item, "import ")) { count++; return }
|
||||||
@ -78,7 +78,7 @@ Volcanos(chat.ONACTION, {list: ["编译", "变更", "源码", "终端", "导图"
|
|||||||
}); return count }
|
}); return count }
|
||||||
can.onaction._run(event, can, button, [can.db.parse, can.Option(nfs.FILE), can.Option(nfs.PATH)], function(msg) {
|
can.onaction._run(event, can, button, [can.db.parse, can.Option(nfs.FILE), can.Option(nfs.PATH)], function(msg) {
|
||||||
if (can.base.Ext(can.Option(nfs.FILE)) == nfs.GO) { var line = can.onaction.selectLine(can); can.onmotion.clear(can, can.ui.content)
|
if (can.base.Ext(can.Option(nfs.FILE)) == nfs.GO) { var line = can.onaction.selectLine(can); can.onmotion.clear(can, can.ui.content)
|
||||||
can.ui.content._max = 0, can.core.List(msg.Result().split(ice.NL), function(item) { can.onaction.appendLine(can, item) })
|
can.ui.content._max = 0, can.core.List(msg.Result().split(lex.NL), function(item) { can.onaction.appendLine(can, item) })
|
||||||
can.onaction.selectLine(can, line+imports(msg.Result())-imports(msg.Option(nfs.CONTENT)))
|
can.onaction.selectLine(can, line+imports(msg.Result())-imports(msg.Option(nfs.CONTENT)))
|
||||||
} can.user.toastSuccess(can, button, can.Option(nfs.PATH)+can.Option(nfs.FILE))
|
} can.user.toastSuccess(can, button, can.Option(nfs.PATH)+can.Option(nfs.FILE))
|
||||||
})
|
})
|
||||||
@ -91,7 +91,7 @@ Volcanos(chat.ONACTION, {list: ["编译", "变更", "源码", "终端", "导图"
|
|||||||
var toast = can.user.toastProcess(can, "重启中..."); can.onmotion.delay(can, function() { toast.close(), can.user.toastSuccess(can) }, 3000)
|
var toast = can.user.toastProcess(can, "重启中..."); can.onmotion.delay(can, function() { toast.close(), can.user.toastSuccess(can) }, 3000)
|
||||||
}) },
|
}) },
|
||||||
"命令": function(event, can) {
|
"命令": function(event, can) {
|
||||||
can.user.input(event, can, [ctx.INDEX, ctx.ARGS], function(list) { can.onimport.tabview(can, "", list[0]+(list[1]? ice.FS+list[1]: ""), ctx.INDEX) })
|
can.user.input(event, can, [ctx.INDEX, ctx.ARGS], function(list) { can.onimport.tabview(can, "", list[0]+(list[1]? mdb.FS+list[1]: ""), ctx.INDEX) })
|
||||||
},
|
},
|
||||||
"插件": function(event, can) { can.user.input(event, can, [ctx.INDEX], function(list) { var sub = can.db.toolkit[list[0]]; if (sub) { sub.select(); return }
|
"插件": function(event, can) { can.user.input(event, can, [ctx.INDEX], function(list) { var sub = can.db.toolkit[list[0]]; if (sub) { sub.select(); return }
|
||||||
can.onimport.toolkit(can, {index: list[0]}, function(sub) { can.db.toolkit[list[0]] = sub.select() })
|
can.onimport.toolkit(can, {index: list[0]}, function(sub) { can.db.toolkit[list[0]] = sub.select() })
|
||||||
@ -100,41 +100,38 @@ Volcanos(chat.ONACTION, {list: ["编译", "变更", "源码", "终端", "导图"
|
|||||||
var sub = can.db.toolkit[list[0]]; sub? sub.select(): can.onimport.exts(can, list[0])
|
var sub = can.db.toolkit[list[0]]; sub? sub.select(): can.onimport.exts(can, list[0])
|
||||||
}) },
|
}) },
|
||||||
"编译": function(event, can) { can.onaction.compile(event, can, code.COMPILE) },
|
"编译": function(event, can) { can.onaction.compile(event, can, code.COMPILE) },
|
||||||
"变更": function(event, can) { can.onimport.tabview(can, "", [web.CODE_GIT_REPOS, can.core.Split(can.Option(nfs.PATH), nfs.PS).pop(), nfs.MASTER, "index", can.Option(nfs.FILE)].join(ice.FS), ctx.INDEX) },
|
"变更": function(event, can) { can.onimport.tabview(can, "", [web.CODE_GIT_REPOS, can.core.Split(can.Option(nfs.PATH), nfs.PS).pop(), nfs.MASTER, "index", can.Option(nfs.FILE)].join(mdb.FS), ctx.INDEX) },
|
||||||
"源码": function(event, can) { can.onimport.tabview(can, "", web.CODE_GIT_REPOS, ctx.INDEX) },
|
"源码": function(event, can) { can.onimport.tabview(can, "", web.CODE_GIT_REPOS, ctx.INDEX) },
|
||||||
"终端": function(event, can) { can.onimport.tabview(can, "", web.CODE_XTERM, ctx.INDEX) },
|
"终端": function(event, can) { can.onimport.tabview(can, "", web.CODE_XTERM, ctx.INDEX) },
|
||||||
"导图": function(event, can) { can.onimport.tabview(can, "", web.WIKI_DRAW, ctx.INDEX) },
|
"导图": function(event, can) { can.onimport.tabview(can, "", web.WIKI_DRAW, ctx.INDEX) },
|
||||||
"计划": function(event, can) { can.onimport.tabview(can, "", web.TEAM_PLAN, ctx.INDEX) },
|
"计划": function(event, can) { can.onimport.tabview(can, "", web.TEAM_PLAN, ctx.INDEX) },
|
||||||
"收藏": function(event, can) { can.onimport.tabview(can, "", web.CHAT_FAVOR, ctx.INDEX) },
|
"收藏": function(event, can) { can.onimport.tabview(can, "", web.CHAT_FAVOR, ctx.INDEX) },
|
||||||
"首页": function(event, can) { can.onimport.tabview(can, "", location.origin+ice.PS+(can.misc.Search(can, log.DEBUG) == ice.TRUE? "?debug=true": ""), web.SPACE) },
|
"首页": function(event, can) { can.onimport.tabview(can, "", location.origin+nfs.PS+(can.misc.Search(can, log.DEBUG) == ice.TRUE? "?debug=true": ""), web.SPACE) },
|
||||||
_selectLine: function(can) { can.page.Select(can, can.current.line, "td.text", function(td) { var target = can.ui.current; target.value = td.innerText
|
|
||||||
can.current.line.appendChild(target), can.page.style(can, target, html.LEFT, td.offsetLeft-1, html.TOP, td.offsetTop, html.WIDTH, can.base.Min(td.offsetWidth, can.ui.content.offsetWidth))
|
|
||||||
can.db.mode == mdb.NORMAL && can.onkeymap._normal(can)
|
|
||||||
}) },
|
|
||||||
insertLine: function(can, value, before) { var line = can.onaction.appendLine(can, value); before && can.ui.content.insertBefore(line, can.onaction._getLine(can, before)); return can.onaction.rerankLine(can), can.onexport.line(can, line) },
|
insertLine: function(can, value, before) { var line = can.onaction.appendLine(can, value); before && can.ui.content.insertBefore(line, can.onaction._getLine(can, before)); return can.onaction.rerankLine(can), can.onexport.line(can, line) },
|
||||||
deleteLine: function(can, line) { line = can.onaction._getLine(can, line); var next = line.nextSibling||line.previousSibling; return can.page.Remove(can, line), can.onaction.rerankLine(can), next },
|
deleteLine: function(can, line) { line = can.onaction._getLine(can, line); var next = line.nextSibling||line.previousSibling; return can.page.Remove(can, line), can.onaction.rerankLine(can), next },
|
||||||
|
_selectLine: function(can) { can.page.Select(can, can.current.line, "td.text", function(td) { var target = can.ui.current; target.value = td.innerText
|
||||||
|
can.current.line.appendChild(target), can.page.style(can, target, html.LEFT, td.offsetLeft-1, html.TOP, td.offsetTop,
|
||||||
|
html.WIDTH, can.base.Min(td.offsetWidth, can.ui.content.offsetWidth-can.page.Select(can, can.current.line, "td.line")[0].offsetWidth))
|
||||||
|
can.db.mode == mdb.NORMAL && can.onkeymap._normal(can)
|
||||||
|
}) },
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONKEYMAP, {
|
Volcanos(chat.ONKEYMAP, {
|
||||||
|
scrollHold: function(can, count, begin) { var scroll = can.ui.content.scrollLeft; can.ui.current.focus(), count != undefined && can.onkeymap.cursorMove(can.ui.current, count, begin == undefined? count: begin), can.ui.content.scrollLeft = scroll },
|
||||||
|
cursorDown: function(can, target) { var p = can.onkeymap.cursorMove(target); can.onaction.selectLine(can, can.current.next()), can.onkeymap.cursorMove(target, 0, p) },
|
||||||
|
cursorUp: function(can, target) { var p = can.onkeymap.cursorMove(target); can.onaction.selectLine(can, can.current.prev()), can.onkeymap.cursorMove(target, 0, p) },
|
||||||
_model: function(can, value) { can.db.mode = value, can.onimport.__tabPath(can, true), can.core.List([mdb.PLUGIN, mdb.NORMAL, mdb.INSERT], function(item) { can.page.ClassList.del(can, can.ui.content, item) }), can.page.ClassList.add(can, can.ui.content, value) },
|
_model: function(can, value) { can.db.mode = value, can.onimport.__tabPath(can, true), can.core.List([mdb.PLUGIN, mdb.NORMAL, mdb.INSERT], function(item) { can.page.ClassList.del(can, can.ui.content, item) }), can.page.ClassList.add(can, can.ui.content, value) },
|
||||||
_plugin: function(can) { can.onkeymap._model(can, mdb.PLUGIN), can.ui.current.blur() },
|
_plugin: function(can) { can.onkeymap._model(can, mdb.PLUGIN), can.ui.current.blur() },
|
||||||
_normal: function(can) { can.onkeymap._model(can, mdb.NORMAL), can.onkeymap.scrollHold(can) },
|
_normal: function(can) { can.onkeymap._model(can, mdb.NORMAL), can.onkeymap.scrollHold(can) },
|
||||||
_insert: function(event, can, count, begin) { can.onkeymap._model(can, mdb.INSERT), can.onkeymap.scrollHold(can, count, begin), can.onkeymap.prevent(event) },
|
_insert: function(event, can, count, begin) { can.onkeymap._model(can, mdb.INSERT), can.onkeymap.scrollHold(can, count, begin), can.onkeymap.prevent(event) },
|
||||||
scrollHold: function(can, count, begin) { var scroll = can.ui.content.scrollLeft; can.ui.current.focus(), count != undefined && can.onkeymap.cursorMove(can.ui.current, count, begin == undefined? count: begin), can.ui.content.scrollLeft = scroll },
|
|
||||||
cursorDown: function(can, target) { var p = can.onkeymap.cursorMove(target); can.onaction.selectLine(can, can.current.next()), can.onkeymap.cursorMove(target, 0, p) },
|
|
||||||
cursorUp: function(can, target) { var p = can.onkeymap.cursorMove(target); can.onaction.selectLine(can, can.current.prev()), can.onkeymap.cursorMove(target, 0, p) },
|
|
||||||
_complete: function(event, can, target) { if (event == undefined || event.type == "click") { return } target = target||can.ui.complete
|
_complete: function(event, can, target) { if (event == undefined || event.type == "click") { return } target = target||can.ui.complete
|
||||||
var pre = can.ui.current.value.slice(0, can.ui.current.selectionStart), key = can.core.Split(pre, "\t .[]", ice.SP).pop()||"", end = can.ui.current.value.slice(can.ui.current.selectionStart)
|
var pre = can.ui.current.value.slice(0, can.ui.current.selectionStart), key = can.core.Split(pre, "\t .[]", lex.SP).pop()||"", end = can.ui.current.value.slice(can.ui.current.selectionStart)
|
||||||
function update() { target._pre = pre, target._end = end, target._index = -1
|
function update() { target._pre = pre, target._end = end, target._index = -1
|
||||||
can.current.line.appendChild(target), can.page.style(can, target, html.LEFT, can.ui.current.offsetLeft, html.MARGIN_TOP, can.current.line.offsetHeight)
|
can.current.line.appendChild(target), can.page.style(can, target, html.LEFT, can.ui.current.offsetLeft, html.MARGIN_TOP, can.user.isChrome? can.current.line.offsetHeight: 5)
|
||||||
can.runAction(can.request(event, {text: pre}, can.Option()), code.COMPLETE, [], function(msg) { can.page.Appends(can, target, [{view: [lex.PREFIX, html.DIV, pre]}])
|
can.runAction(can.request(event, {text: pre}, can.Option()), code.COMPLETE, [], function(msg) { can.page.Appends(can, target, [{view: [lex.PREFIX, html.DIV, pre]}])
|
||||||
if (can.db.parse == nfs.JS) { var msg = can.request()
|
var parse = can.onsyntax[can.base.Ext(can.Option(nfs.FILE))]; can.core.CallFunc(can.core.Value(parse, code.COMPLETE), [event, can, msg, target, pre, key])
|
||||||
var ls = can.core.Split(can.core.Split(pre, "\t {(:,)}").pop(), ice.PT), list = {can: can, msg: msg, target: target, window: window}
|
can.core.Item(can.core.Value(parse, code.KEYWORD), function(key, value) { msg.Push(mdb.NAME, key) })
|
||||||
can.core.ItemKeys(key == ""? list: can.core.Value(list, ls)||can.core.Value(window, ls)||window, function(k, v) {
|
|
||||||
msg.Push(mdb.NAME, k).Push(mdb.TEXT, (v+"").split(ice.NL)[0])
|
|
||||||
})
|
|
||||||
} can.core.Item(can.core.Value(can.onsyntax[can.db.parse], code.KEYWORD), function(key, value) { msg.Push(mdb.NAME, key) })
|
|
||||||
can.onappend.table(can, msg, function(value, key, index) { return {text: [value, html.TD], onclick: function(event) { change(value) }} }, target)
|
can.onappend.table(can, msg, function(value, key, index) { return {text: [value, html.TD], onclick: function(event) { change(value) }} }, target)
|
||||||
can.page.style(can, target, html.MAX_HEIGHT, can.ui._content.offsetHeight-(can.current.line.offsetTop-can.ui.content.scrollTop)-can.current.line.offsetHeight)
|
can.page.style(can, target, html.MAX_HEIGHT, can.ui.content.offsetHeight-(can.current.line.offsetTop-can.ui.content.scrollTop)-can.current.line.offsetHeight)
|
||||||
can.onmotion.toggle(can, target, true)
|
can.onmotion.toggle(can, target, true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -153,9 +150,9 @@ Volcanos(chat.ONKEYMAP, {
|
|||||||
default: return can.onkeymap.selectCtrlN(event, can, target, [html.TBODY, html.TR+html.NOT_HIDE], function(tr) { change(can.page.Select(can, tr, html.TD)[0].innerText) })
|
default: return can.onkeymap.selectCtrlN(event, can, target, [html.TBODY, html.TR+html.NOT_HIDE], function(tr) { change(can.page.Select(can, tr, html.TD)[0].innerText) })
|
||||||
} return can.onkeymap.prevent(event) } return }
|
} return can.onkeymap.prevent(event) } return }
|
||||||
switch (pre.slice(-1)) {
|
switch (pre.slice(-1)) {
|
||||||
case ice.TB:
|
case lex.TB:
|
||||||
case ice.SP:
|
case lex.SP:
|
||||||
case ice.PT:
|
case nfs.PT:
|
||||||
case "[":
|
case "[":
|
||||||
case "(":
|
case "(":
|
||||||
case "{": update(); break
|
case "{": update(); break
|
||||||
@ -204,12 +201,12 @@ Volcanos(chat.ONKEYMAP, {
|
|||||||
i: shy("插入模式", function(event, can) { can.onkeymap._insert(event, can) }),
|
i: shy("插入模式", function(event, can) { can.onkeymap._insert(event, can) }),
|
||||||
a: shy("插入模式", function(event, can) { can.onkeymap._insert(event, can) }),
|
a: shy("插入模式", function(event, can) { can.onkeymap._insert(event, can) }),
|
||||||
o: shy("插入下一行", function(event, can) { var text = can.current.text()
|
o: shy("插入下一行", function(event, can) { var text = can.current.text()
|
||||||
text = text.substr(0, text.indexOf(text.trimLeft()))+(can.base.endWith(text, "{")? ice.TB: "")
|
text = text.substr(0, text.indexOf(text.trimLeft()))+(can.base.endWith(text, "{")? lex.TB: "")
|
||||||
can.onaction.selectLine(can, can.onaction.insertLine(can, text, can.current.next()))
|
can.onaction.selectLine(can, can.onaction.insertLine(can, text, can.current.next()))
|
||||||
can.onkeymap._insert(event, can, 0, -1)
|
can.onkeymap._insert(event, can, 0, -1)
|
||||||
}),
|
}),
|
||||||
O: shy("插入上一行", function(event, can) { var text = can.current.text()
|
O: shy("插入上一行", function(event, can) { var text = can.current.text()
|
||||||
text = text.substr(0, text.indexOf(text.trimLeft()))+(can.base.beginWith(text, "}")? ice.TB: "")
|
text = text.substr(0, text.indexOf(text.trimLeft()))+(can.base.beginWith(text, "}")? lex.TB: "")
|
||||||
can.onaction.selectLine(can, can.onaction.insertLine(can, text, can.current.line))
|
can.onaction.selectLine(can, can.onaction.insertLine(can, text, can.current.line))
|
||||||
can.onkeymap._insert(event, can, 0, -1)
|
can.onkeymap._insert(event, can, 0, -1)
|
||||||
}),
|
}),
|
||||||
@ -235,7 +232,7 @@ Volcanos(chat.ONKEYMAP, {
|
|||||||
}),
|
}),
|
||||||
J: shy("合并两行", function(can) { var next = can.current.next(); if (!next) { return }
|
J: shy("合并两行", function(can) { var next = can.current.next(); if (!next) { return }
|
||||||
var line = can.onaction.selectLine(can), text = can.current.text(), rest = can.onexport.text(can, next)
|
var line = can.onaction.selectLine(can), text = can.current.text(), rest = can.onexport.text(can, next)
|
||||||
can.ui.current.value = can.current.text(text.trimRight()+(can.base.endWith(text.trim(), "(", "[")||can.base.beginWith(rest.trim(), ",", "]", ")")? "": ice.SP)+rest.trimLeft())
|
can.ui.current.value = can.current.text(text.trimRight()+(can.base.endWith(text.trim(), "(", "[")||can.base.beginWith(rest.trim(), ",", "]", ")")? "": lex.SP)+rest.trimLeft())
|
||||||
can.onkeymap.cursorMove(can.ui.current, text.length, 0), can.onaction.deleteLine(can, next)
|
can.onkeymap.cursorMove(can.ui.current, text.length, 0), can.onaction.deleteLine(can, next)
|
||||||
can.db.undo.push(function() { can.onaction.modifyLine(can, line, text), can.onaction.insertLine(can, rest, line+1) })
|
can.db.undo.push(function() { can.onaction.modifyLine(can, line, text), can.onaction.insertLine(can, rest, line+1) })
|
||||||
}),
|
}),
|
||||||
@ -261,7 +258,7 @@ Volcanos(chat.ONKEYMAP, {
|
|||||||
o: shy("关闭其它", function(can) { can.onlayout.only(can) }),
|
o: shy("关闭其它", function(can) { can.onlayout.only(can) }),
|
||||||
},
|
},
|
||||||
insert_ctrl: {
|
insert_ctrl: {
|
||||||
a: shy("光标行首", function(can, target) { for (var i = 0; i < target.value.length; i++) { if (target.value[i] != ice.TB) { break } } can.onkeymap.cursorMove(target, i, 0), can.onkeymap.prevent(event) }),
|
a: shy("光标行首", function(can, target) { for (var i = 0; i < target.value.length; i++) { if (target.value[i] != lex.TB) { break } } can.onkeymap.cursorMove(target, i, 0), can.onkeymap.prevent(event) }),
|
||||||
e: shy("光标行尾", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, 0, -1) }),
|
e: shy("光标行尾", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, 0, -1) }),
|
||||||
b: shy("光标左移", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, -1) }),
|
b: shy("光标左移", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, -1) }),
|
||||||
f: shy("光标右移", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, 1) }),
|
f: shy("光标右移", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, 1) }),
|
||||||
@ -275,18 +272,18 @@ Volcanos(chat.ONKEYMAP, {
|
|||||||
var rest = can.current.text(); can.onaction.selectLine(can, can.current.prev()), can.onaction.deleteLine(can, can.current.next())
|
var rest = can.current.text(); can.onaction.selectLine(can, can.current.prev()), can.onaction.deleteLine(can, can.current.next())
|
||||||
var text = can.current.text(); can.ui.current.value = text+rest, can.onkeymap.cursorMove(target, 0, text.length)
|
var text = can.current.text(); can.ui.current.value = text+rest, can.onkeymap.cursorMove(target, 0, text.length)
|
||||||
}),
|
}),
|
||||||
Tab: shy("添加缩进", function(event, can) { can.onkeymap.insertText(can.ui.current, ice.TB), can.onkeymap.prevent(event) }),
|
Tab: shy("添加缩进", function(event, can) { can.onkeymap.insertText(can.ui.current, lex.TB), can.onkeymap.prevent(event) }),
|
||||||
Enter: shy("插入换行", function(can, target) {
|
Enter: shy("插入换行", function(can, target) {
|
||||||
var rest = can.onkeymap.deleteText(target, target.selectionEnd).trimLeft(), text = can.ui.current.value
|
var rest = can.onkeymap.deleteText(target, target.selectionEnd).trimLeft(), text = can.ui.current.value
|
||||||
var left = text.substr(0, text.indexOf(text.trimLeft()))||(text.trimRight() == ""? text: "")
|
var left = text.substr(0, text.indexOf(text.trimLeft()))||(text.trimRight() == ""? text: "")
|
||||||
var line = can.onaction.selectLine(can), next = rest; for (var i = line; i < can.db.max; i++) { next += can.onexport.text(can, can.onaction._getLine(can, i)).trimLeft(); if (next != "") { break } }
|
var line = can.onaction.selectLine(can), next = rest; for (var i = line; i < can.db.max; i++) { next += can.onexport.text(can, can.onaction._getLine(can, i)).trimLeft(); if (next != "") { break } }
|
||||||
function deep(text) { var deep = 0; for (var i = 0; i < text.length; i++) { if (text[i] == ice.TB) { deep += 4 } else if (text[i] == ice.SP) { deep++ } else { break } } return deep }
|
function deep(text) { var deep = 0; for (var i = 0; i < text.length; i++) { if (text[i] == lex.TB) { deep += 4 } else if (text[i] == lex.SP) { deep++ } else { break } } return deep }
|
||||||
text.trim() && can.core.List(["{}", "[]", "()", "``"], function(item) { if (can.base.endWith(text, item[0])) {
|
text.trim() && can.core.List(["{}", "[]", "()", "``"], function(item) { if (can.base.endWith(text, item[0])) {
|
||||||
if (can.base.beginWith(next, item[1])) {
|
if (can.base.beginWith(next, item[1])) {
|
||||||
can.onaction.insertLine(can, left+rest, can.current.next()), rest = ""
|
can.onaction.insertLine(can, left+rest, can.current.next()), rest = ""
|
||||||
} else if (deep(text) >= deep(can.onexport.text(can, can.onaction._getLine(can, line+1))) && rest == "") {
|
} else if (deep(text) >= deep(can.onexport.text(can, can.onaction._getLine(can, line+1))) && rest == "") {
|
||||||
can.onaction.insertLine(can, left+item[1], can.current.next())
|
can.onaction.insertLine(can, left+item[1], can.current.next())
|
||||||
} left += ice.TB
|
} left += lex.TB
|
||||||
} else if (can.base.beginWith(rest, item[1])) { left = left.slice(0, -1) }})
|
} else if (can.base.beginWith(rest, item[1])) { left = left.slice(0, -1) }})
|
||||||
var line = can.onaction.insertLine(can, left+rest, can.current.next())
|
var line = can.onaction.insertLine(can, left+rest, can.current.next())
|
||||||
can.current.text(text.trimRight()||text), can.onaction.selectLine(can, line), can.onkeymap._insert(event, can, 0, left.length)
|
can.current.text(text.trimRight()||text), can.onaction.selectLine(can, line), can.onkeymap._insert(event, can, 0, left.length)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user