1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-28 10:12:02 +08:00

opt chrome

This commit is contained in:
shaoying 2020-07-01 09:58:33 +08:00
parent b83f39847d
commit 1f748b17b3
6 changed files with 88 additions and 160 deletions

View File

@ -4,7 +4,6 @@ import (
ice "github.com/shylinux/icebergs" ice "github.com/shylinux/icebergs"
"github.com/shylinux/icebergs/base/cli" "github.com/shylinux/icebergs/base/cli"
"github.com/shylinux/icebergs/base/gdb" "github.com/shylinux/icebergs/base/gdb"
"github.com/shylinux/icebergs/base/mdb"
"github.com/shylinux/icebergs/base/nfs" "github.com/shylinux/icebergs/base/nfs"
kit "github.com/shylinux/toolkits" kit "github.com/shylinux/toolkits"
@ -25,7 +24,7 @@ func _dream_list(m *ice.Message) {
m.Push(kit.MDB_STATUS, gdb.STOP) m.Push(kit.MDB_STATUS, gdb.STOP)
} }
for _, k := range []string{"start", "stop", "restart"} { for _, k := range []string{"start", "stop", "restart"} {
m.Push(k, m.Cmdx(mdb.RENDER, RENDER.Button, k)) m.Push(k, m.Cmdx("_render", RENDER.Button, k))
} }
}) })
m.Sort(kit.MDB_NAME) m.Sort(kit.MDB_NAME)

View File

@ -35,7 +35,7 @@ func init() {
Commands: map[string]*ice.Command{ Commands: map[string]*ice.Command{
DRAW: {Name: "draw path=hi.svg auto", Help: "思维导图", Meta: kit.Dict(mdb.PLUGIN, DrawPlugin), Action: map[string]*ice.Action{ DRAW: {Name: "draw path=hi.svg auto", Help: "思维导图", Meta: kit.Dict(mdb.PLUGIN, DrawPlugin), Action: map[string]*ice.Action{
nfs.SAVE: {Name: "save path text", Help: "保存", Hand: func(m *ice.Message, arg ...string) { nfs.SAVE: {Name: "save path text", Help: "保存", Hand: func(m *ice.Message, arg ...string) {
_wiki_save(m, DATA, arg[0], kit.Select(m.Option("content"), arg, 1)) _wiki_save(m, DRAW, arg[0], kit.Select(m.Option("content"), arg, 1))
}}, }},
"run": {Name: "show zone type name text", Help: "运行", Hand: func(m *ice.Message, arg ...string) { "run": {Name: "show zone type name text", Help: "运行", Hand: func(m *ice.Message, arg ...string) {
_draw_show(m, arg[0], arg[1], arg[2], arg[3], arg[4:]...) _draw_show(m, arg[0], arg[1], arg[2], arg[3], arg[4:]...)

View File

@ -9,6 +9,8 @@ import (
) )
const CHROME = "chrome" const CHROME = "chrome"
const HISTORY = "history"
const BOOKMARK = "bookmark"
var Index = &ice.Context{Name: "chrome", Help: "浏览器", var Index = &ice.Context{Name: "chrome", Help: "浏览器",
Configs: map[string]*ice.Config{ Configs: map[string]*ice.Config{
@ -18,80 +20,39 @@ var Index = &ice.Context{Name: "chrome", Help: "浏览器",
}, },
Commands: map[string]*ice.Command{ Commands: map[string]*ice.Command{
"/crx": {Name: "/crx", Help: "/crx", Action: map[string]*ice.Action{ "/crx": {Name: "/crx", Help: "/crx", Action: map[string]*ice.Action{
"history": {Name: "history", Help: "历史记录", Hand: func(m *ice.Message, arg ...string) { web.HISTORY: {Name: "history", Help: "历史记录", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(web.SPIDE, "dev", "/code/chrome/favor", "cmds", "insert", "name", arg[1], "note", arg[2], m.Cmdy(web.SPIDE, "dev", "/code/chrome/favor", "cmds", mdb.INSERT,
"tab", m.Conf(CHROME, "meta.favor"), "sid", m.Option("sid")) "tab", m.Conf(CHROME, "meta.favor"), "name", arg[1], "note", arg[2],
"sid", m.Option("sid"))
}}, }},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},
}},
"/favor": {Name: "/favor", Help: "收藏", Action: map[string]*ice.Action{ "/favor": {Name: "/favor", Help: "收藏", Action: map[string]*ice.Action{
mdb.INSERT: {Name: "insert", Help: "插入", Hand: func(m *ice.Message, arg ...string) { mdb.INSERT: {Name: "insert", Help: "插入", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(web.FAVOR, mdb.INSERT, m.Option("tab"), web.SPIDE, m.Option("name"), m.Option("note")) m.Cmdy(web.FAVOR, mdb.INSERT, m.Option("tab"), web.SPIDE, m.Option("name"), m.Option("note"))
}}, }},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},
}},
CHROME: {Name: "chrome", Help: "浏览器", List: kit.List( CHROME: {Name: "chrome name=chrome wid=auto url auto", Help: "浏览器", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
kit.MDB_INPUT, "text", "name", "name", "action", "auto",
kit.MDB_INPUT, "text", "name", "wid", "action", "auto",
kit.MDB_INPUT, "text", "name", "url",
kit.MDB_INPUT, "button", "name", "查看",
kit.MDB_INPUT, "button", "name", "返回", "cb", "Last",
), Meta: kit.Dict("detail", []string{"编辑", "goBack", "goForward", "duplicate", "reload", "remove"}), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) == 0 { if len(arg) == 0 {
// 窗口列表 // 窗口列表
m.Richs(web.SPACE, nil, "*", func(key string, value map[string]interface{}) { m.Richs(web.SPACE, nil, kit.MDB_FOREACH, func(key string, value map[string]interface{}) {
if kit.Format(value["type"]) == "chrome" { if kit.Format(value[kit.MDB_TYPE]) == CHROME {
m.Push(key, value, []string{"time", "name"}) m.Push(key, value, []string{kit.MDB_TIME, kit.MDB_NAME})
} }
}) })
return return
} }
if arg[0] == "action" {
// 命令转换
m.Cmdy(web.SPACE, m.Option("name"), "tabs", m.Option("tid"), arg[1])
arg = []string{m.Option("name"), m.Option("wid")}
}
// 下发命令 // 下发命令
m.Cmdy(web.SPACE, arg[0], "wins", arg[1:]) m.Cmdy(web.SPACE, arg[0], CHROME, arg[1:])
}}, }},
"cookie": {Name: "cookie", Help: "数据", List: kit.List( BOOKMARK: {Name: "bookmark name=chrome auto", Help: "书签", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
kit.MDB_INPUT, "text", "name", "name", "action", "auto",
kit.MDB_INPUT, "text", "name", "id", "action", "auto",
kit.MDB_INPUT, "button", "name", "查看",
kit.MDB_INPUT, "button", "name", "返回", "cb", "Last",
), Meta: kit.Dict("detail", []string{"编辑", "删除"}), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) == 0 { if len(arg) == 0 {
// 窗口列表 // 窗口列表
m.Cmdy("chrome") m.Cmdy(CHROME)
return return
} }
if arg[0] == "action" {
// 命令转换
m.Cmdy(web.SPACE, m.Option("name"), "cookie", arg[1:])
arg = []string{m.Option("name"), m.Option("id")}
}
// 下发命令 // 下发命令
m.Cmdy(web.SPACE, arg[0], "cookie", arg[1:]) m.Cmdy(web.SPACE, arg[0], BOOKMARK, arg[1:])
}},
"bookmark": {Name: "bookmark", Help: "书签", List: kit.List(
kit.MDB_INPUT, "text", "name", "name", "action", "auto",
kit.MDB_INPUT, "text", "name", "id", "action", "auto",
kit.MDB_INPUT, "button", "name", "查看",
kit.MDB_INPUT, "button", "name", "返回", "cb", "Last",
), Meta: kit.Dict("detail", []string{"编辑", "删除"}), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) == 0 {
// 窗口列表
m.Cmdy("chrome")
return
}
if arg[0] == "action" {
// 命令转换
m.Cmdy(web.SPACE, m.Option("name"), "bookmark", arg[1:])
arg = []string{m.Option("name"), m.Option("id")}
}
// 下发命令
m.Cmdy(web.SPACE, arg[0], "bookmark", arg[1:])
}}, }},
}, },
} }

View File

@ -33,6 +33,16 @@ func _input_list(m *ice.Message, lib string) {
}) })
} }
func _input_push(m *ice.Message, lib, text, code, weight string) { func _input_push(m *ice.Message, lib, text, code, weight string) {
if m.Richs(INPUT, "", lib, nil) == nil {
m.Rich(INPUT, "", kit.Data(
kit.MDB_STORE, path.Join(m.Conf(INPUT, "meta.store"), lib),
kit.MDB_FSIZE, m.Conf(INPUT, "meta.fsize"),
kit.MDB_LIMIT, m.Conf(INPUT, "meta.limit"),
kit.MDB_LEAST, m.Conf(INPUT, "meta.least"),
kit.MDB_ZONE, lib,
))
}
m.Richs(INPUT, "", lib, func(key string, value map[string]interface{}) { m.Richs(INPUT, "", lib, func(key string, value map[string]interface{}) {
prefix := kit.Keys(kit.MDB_HASH, key) prefix := kit.Keys(kit.MDB_HASH, key)
m.Conf(INPUT, kit.Keys(prefix, "meta.limit"), 0) m.Conf(INPUT, kit.Keys(prefix, "meta.limit"), 0)
@ -140,7 +150,7 @@ func _input_load(m *ice.Message, file string, libs ...string) {
kit.MDB_FSIZE, m.Conf(INPUT, "meta.fsize"), kit.MDB_FSIZE, m.Conf(INPUT, "meta.fsize"),
kit.MDB_LIMIT, m.Conf(INPUT, "meta.limit"), kit.MDB_LIMIT, m.Conf(INPUT, "meta.limit"),
kit.MDB_LEAST, m.Conf(INPUT, "meta.least"), kit.MDB_LEAST, m.Conf(INPUT, "meta.least"),
"zone", lib, kit.MDB_ZONE, lib,
))) )))
// 缓存配置 // 缓存配置

View File

@ -10,7 +10,6 @@ fun! ShyLog(...)
endfun endfun
" 后端通信 " 后端通信
call ShyDefine("g:ctx_sid", "")
call ShyDefine("g:ctx_url", (len($ctx_dev) > 1? $ctx_dev: "http://127.0.0.1:9020") . "/code/vim/") call ShyDefine("g:ctx_url", (len($ctx_dev) > 1? $ctx_dev: "http://127.0.0.1:9020") . "/code/vim/")
fun! ShySend(cmd, arg) fun! ShySend(cmd, arg)
if has_key(a:arg, "sub") && a:arg["sub"] != "" if has_key(a:arg, "sub") && a:arg["sub"] != ""
@ -19,7 +18,6 @@ fun! ShySend(cmd, arg)
let a:arg["sub"] = "@" . temp let a:arg["sub"] = "@" . temp
endif endif
let a:arg["sid"] = g:ctx_sid
let a:arg["pwd"] = getcwd() let a:arg["pwd"] = getcwd()
let a:arg["buf"] = bufname("%") let a:arg["buf"] = bufname("%")
let a:arg["row"] = line(".") let a:arg["row"] = line(".")
@ -31,18 +29,6 @@ fun! ShySend(cmd, arg)
return system("curl -s " . g:ctx_url . a:cmd . args . " 2>/dev/null") return system("curl -s " . g:ctx_url . a:cmd . args . " 2>/dev/null")
endfun endfun
" 用户登录
fun! ShyLogout()
if g:ctx_sid != "" | call ShySend("logout", {}) | endif
endfun
fun! ShyLogin()
let g:ctx_sid = ShySend("login", {"share": $ctx_share, "pid": getpid(), "pane": $TMUX_PANE, "hostname": hostname(), "username": $USER})
endfun
fun! ShyHelp()
echo ShySend("help", {})
endfun
call ShyLogin()
" 数据同步 " 数据同步
fun! ShySync(target) fun! ShySync(target)
if bufname("%") == "ControlP" | return | end if bufname("%") == "ControlP" | return | end
@ -128,22 +114,6 @@ fun! ShyFavors()
botright lopen botright lopen
if l:view == 1 | only | endif if l:view == 1 | only | endif
endfun endfun
fun! ShyCheck(target)
if a:target == "cache"
call ShySync("bufs")
call ShySync("regs")
call ShySync("marks")
call ShySync("tags")
elseif a:target == "fixs"
let l = len(getqflist())
if l > 0
execute "copen " . (l > 10? 10: l + 1)
call ShySync("fixs")
else
cclose
end
end
endfun
" 搜索 " 搜索
call ShyDefine("g:grep_dir", "./") call ShyDefine("g:grep_dir", "./")
@ -154,20 +124,24 @@ fun! ShyGrep(word)
copen copen
endfun endfun
" 任务列表
fun! ShyTask()
call ShySend({"cmd": "tasklet", "arg": input("target: "), "sub": input("detail: ")})
endfun
" 标签列表
fun! ShyTag(word)
execute "tag " . a:word
endfun
" 自动刷新 " 自动刷新
let ShyComeList = {} let ShyComeList = {}
fun! ShyCome(buf, row, action, extra) fun! ShyCome(buf, row, action, extra)
" 低配命令
if !exists("appendbufline")
execute a:extra["row"]
if a:extra["count"] > 0
execute "+1,+" . a:extra["count"] ."delete"
endif
let a:extra["count"] = 0
for line in reverse(split(ShySend("sync", {"cmds": "trans", "arg": getline(".")}), "\n"))
let a:extra["count"] += 1
call append(".", line)
endfor
return
endif
if a:action == "refresh" if a:action == "refresh"
" 清空历史 " 清空历史
if a:extra["count"] > 0 | call deletebufline(a:buf, a:row+1, a:row+a:extra["count"]) | endif if a:extra["count"] > 0 | call deletebufline(a:buf, a:row+1, a:row+a:extra["count"]) | endif
@ -188,13 +162,6 @@ fun! ShyUpdate(timer)
call ShyCome(what["buf"], what["row"], what["action"], what) call ShyCome(what["buf"], what["row"], what["action"], what)
endfun endfun
fun! ShyComes(action) fun! ShyComes(action)
" 低配命令
if !exists("appendbufline")
for line in reverse(split(ShySend({"cmd": "trans", "arg": getline(".")}), "\n"))
call append(".", line)
endfor
return
endif
if !exists("b:timer") | let b:timer = -1 | endif if !exists("b:timer") | let b:timer = -1 | endif
" 清除定时 " 清除定时
if b:timer > 0 | call timer_stop(b:timer) | let b:timer = -2 | return | endif if b:timer > 0 | call timer_stop(b:timer) | let b:timer = -2 | return | endif
@ -203,9 +170,24 @@ fun! ShyComes(action)
let g:ShyComeList[b:timer] = {"buf": bufname("."), "row": line("."), "pre": getline("."), "action": a:action, "count": 0} let g:ShyComeList[b:timer] = {"buf": bufname("."), "row": line("."), "pre": getline("."), "action": a:action, "count": 0}
call ShyLog("new timer", b:timer) call ShyLog("new timer", b:timer)
endfun endfun
fun! ShyCheck(target)
if a:target == "cache"
call ShySync("bufs")
call ShySync("regs")
call ShySync("marks")
call ShySync("tags")
elseif a:target == "fixs"
let l = len(getqflist())
if l > 0
execute "copen " . (l > 10? 10: l + 1)
call ShySync("fixs")
else
cclose
end
end
endfun
" 事件回调 " 事件回调
autocmd! VimLeave * call ShyLogout()
autocmd! BufReadPost * call ShySync("bufs") autocmd! BufReadPost * call ShySync("bufs")
autocmd! BufReadPost * call ShySync("read") autocmd! BufReadPost * call ShySync("read")
autocmd! BufWritePre * call ShySync("write") autocmd! BufWritePre * call ShySync("write")
@ -218,11 +200,10 @@ endif
autocmd! InsertLeave * call ShySync("insert") autocmd! InsertLeave * call ShySync("insert")
" 按键映射 " 按键映射
nnoremap <C-G><C-G> :call ShyGrep(expand("<cword>"))<CR>
nnoremap <C-G><C-F> :call ShyFavor()<CR> nnoremap <C-G><C-F> :call ShyFavor()<CR>
nnoremap <C-G>f :call ShyFavors()<CR> nnoremap <C-G>f :call ShyFavors()<CR>
nnoremap <C-G><C-G> :call ShyGrep(expand("<cword>"))<CR>
" nnoremap <C-G><C-R> :call ShyCheck("cache")<CR> " nnoremap <C-G><C-R> :call ShyCheck("cache")<CR>
" nnoremap <C-G><C-T> :call ShyTask()<CR>
nnoremap <C-G><C-K> :call ShyComes("refresh")<CR> nnoremap <C-G><C-K> :call ShyComes("refresh")<CR>
inoremap <C-K> <C-X><C-U> inoremap <C-K> <C-X><C-U>

View File

@ -1,24 +1,25 @@
package vim package vim
import ( import (
"fmt"
ice "github.com/shylinux/icebergs" ice "github.com/shylinux/icebergs"
"github.com/shylinux/icebergs/base/cli" "github.com/shylinux/icebergs/base/cli"
"github.com/shylinux/icebergs/base/web" "github.com/shylinux/icebergs/base/web"
"github.com/shylinux/icebergs/core/code" "github.com/shylinux/icebergs/core/code"
kit "github.com/shylinux/toolkits" kit "github.com/shylinux/toolkits"
"fmt"
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path"
"strings" "strings"
) )
const VIM = "vim"
var Index = &ice.Context{Name: "vim", Help: "编辑器", var Index = &ice.Context{Name: "vim", Help: "编辑器",
Caches: map[string]*ice.Cache{}, Caches: map[string]*ice.Cache{},
Configs: map[string]*ice.Config{ Configs: map[string]*ice.Config{
"vim": {Name: "vim", Help: "编辑器", Value: kit.Data( VIM: {Name: "vim", Help: "编辑器", Value: kit.Data(
"source", "ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2", "source", "ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2",
"target", "usr/local", "version", "vim81", "config", []interface{}{ "target", "usr/local", "version", "vim81", "config", []interface{}{
"--enable-pythoninterp=yes", "--enable-pythoninterp=yes",
@ -84,52 +85,23 @@ var Index = &ice.Context{Name: "vim", Help: "编辑器",
code.PROJECT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { code.PROJECT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
}}, }},
web.LOGIN: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if f, _, e := m.R.FormFile("sub"); e == nil {
defer f.Close()
// 文件参数
if b, e := ioutil.ReadAll(f); e == nil {
m.Option("sub", string(b))
}
}
ls := strings.Split(m.Option("pwd"), "/")
m.Option("you", ls[len(ls)-1])
m.Richs("login", nil, m.Option("sid"), func(key string, value map[string]interface{}) {
// 查找空间
m.Option("you", kit.Select(m.Option("you"), value["you"]))
})
m.Logs(ice.LOG_AUTH, "you", m.Option("you"), "url", m.Option(ice.MSG_USERURL), "cmd", m.Optionv("cmds"), "sub", m.Optionv("sub"))
m.Option(ice.MSG_OUTPUT, ice.RENDER_RESULT)
}},
"/help": {Name: "/help", Help: "帮助", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Cmdy("help")
}},
"/login": {Name: "/login", Help: "登录", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Cmdy("login", "init", c.Name)
}},
"/logout": {Name: "/logout", Help: "登出", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Cmdy("login", "exit")
}},
"/sync": {Name: "/sync", Help: "同步", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { "/sync": {Name: "/sync", Help: "同步", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Render(ice.RENDER_RESULT)
switch arg[0] { switch arg[0] {
case "read", "write", "exec", "insert": case "read", "write", "exec", "insert":
m.Cmd(web.FAVOR, m.Conf("vim", "meta.history"), web.TYPE_VIMRC, arg[0], kit.Select(m.Option("arg"), m.Option("sub")), m.Cmd(web.FAVOR, m.Conf(VIM, "meta.history"), web.TYPE_VIMRC, arg[0], kit.Select(m.Option("arg"), m.Option("sub")),
"sid", m.Option("sid"), "pwd", m.Option("pwd"), "buf", m.Option("buf"), "row", m.Option("row"), "col", m.Option("col")) "pwd", m.Option("pwd"), "buf", m.Option("buf"), "row", m.Option("row"), "col", m.Option("col"))
case "trans":
default: if m.Cmdy(kit.Split(m.Option("arg"))); m.Result() == "" {
m.Richs("login", nil, m.Option("sid"), func(key string, value map[string]interface{}) { m.Table()
kit.Value(value, kit.Keys("sync", arg[0]), kit.Dict( }
"time", m.Time(), "text", m.Option("sub"),
"pwd", m.Option("pwd"), "buf", m.Option("buf"),
))
})
} }
}}, }},
"/input": {Name: "/input", Help: "补全", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { "/input": {Name: "/input", Help: "补全", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if strings.HasPrefix(strings.TrimSpace(arg[0]), "ice ") { m.Render(ice.RENDER_RESULT)
arg[0] = strings.TrimSpace(arg[0])
if strings.HasPrefix(arg[0], "ice ") {
list := kit.Split(strings.TrimSpace(arg[0])) list := kit.Split(strings.TrimSpace(arg[0]))
switch list[1] { switch list[1] {
case "add": case "add":
@ -137,8 +109,9 @@ var Index = &ice.Context{Name: "vim", Help: "编辑器",
m.Cmd("web.code.input.push", list[2:]) m.Cmd("web.code.input.push", list[2:])
arg[0] = list[4] arg[0] = list[4]
default: default:
// 执行命令 // ice add person 想你 shwq
if m.Cmdy(list[1:]); m.Result() == "" { if m.Cmdy(list[1:]); m.Result() == "" {
m.Echo("%s\n", arg[0])
m.Table() m.Table()
} }
return return
@ -151,6 +124,7 @@ var Index = &ice.Context{Name: "vim", Help: "编辑器",
}) })
}}, }},
"/favor": {Name: "/favor", Help: "收藏", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { "/favor": {Name: "/favor", Help: "收藏", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Render(ice.RENDER_RESULT)
if m.Options("arg") { if m.Options("arg") {
// 添加收藏 // 添加收藏
m.Cmdy(web.FAVOR, kit.Select(m.Conf("vim", "meta.history"), m.Option("tab")), m.Cmdy(web.FAVOR, kit.Select(m.Conf("vim", "meta.history"), m.Option("tab")),
@ -160,12 +134,15 @@ var Index = &ice.Context{Name: "vim", Help: "编辑器",
} }
// 查看收藏 // 查看收藏
m.Cmd(web.PROXY, m.Option("you"), web.FAVOR, m.Option("tab"), "extra", "extra.pwd", "extra.buf", "extra.row", "extra.col").Table(func(index int, value map[string]string, head []string) { m.Richs(web.FAVOR, nil, m.Option("tab"), func(key string, val map[string]interface{}) {
switch value["type"] { m.Grows(web.FAVOR, kit.Keys(kit.MDB_HASH, key), "", "", func(index int, value map[string]interface{}) {
case web.TYPE_VIMRC: extra := value["extra"].(map[string]interface{})
m.Echo("%v\n", m.Option("tab")).Echo("%v:%v:%v:(%v): %v\n", switch value[kit.MDB_TYPE] {
value["extra.buf"], value["extra.row"], value["extra.col"], value["name"], value["text"]) case web.TYPE_VIMRC:
} m.Echo("%v\n", m.Option("tab")).Echo("%v:%v:%v:(%v): %v\n",
extra["buf"], extra["row"], extra["col"], value["name"], value["text"])
}
})
}) })
}}, }},
}, },