forked from x/icebergs
opt vim
This commit is contained in:
parent
d98d392a61
commit
60a275897f
@ -195,7 +195,7 @@ func ZoneSelect(m *ice.Message, arg ...string) *ice.Message {
|
|||||||
arg = kit.Slice(arg, 0, 2)
|
arg = kit.Slice(arg, 0, 2)
|
||||||
m.Fields(len(arg), kit.Select(kit.Fields(TIME, m.Config(SHORT), COUNT), m.Config(FIELDS)), ZoneField(m))
|
m.Fields(len(arg), kit.Select(kit.Fields(TIME, m.Config(SHORT), COUNT), m.Config(FIELDS)), ZoneField(m))
|
||||||
if m.Cmdy(SELECT, m.PrefixKey(), "", ZONE, arg, logs.FileLineMeta(-1)); len(arg) == 0 {
|
if m.Cmdy(SELECT, m.PrefixKey(), "", ZONE, arg, logs.FileLineMeta(-1)); len(arg) == 0 {
|
||||||
m.StatusTimeCount().PushAction(m.Config(ACTION), REMOVE).Sort(ZoneShort(m))
|
m.PushAction(m.Config(ACTION), REMOVE).StatusTimeCount().Sort(ZoneShort(m))
|
||||||
} else if len(arg) == 1 {
|
} else if len(arg) == 1 {
|
||||||
m.StatusTimeCountTotal(_mdb_getmeta(m, "", kit.Keys(HASH, HashSelectField(m, arg[0], HASH)), COUNT))
|
m.StatusTimeCountTotal(_mdb_getmeta(m, "", kit.Keys(HASH, HashSelectField(m, arg[0], HASH)), COUNT))
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ func _link_file(m *ice.Message, name string, from string) {
|
|||||||
const (
|
const (
|
||||||
CONTENT = "content"
|
CONTENT = "content"
|
||||||
)
|
)
|
||||||
|
const LOAD = "load"
|
||||||
const DEFS = "defs"
|
const DEFS = "defs"
|
||||||
const SAVE = "save"
|
const SAVE = "save"
|
||||||
const PUSH = "push"
|
const PUSH = "push"
|
||||||
|
@ -74,6 +74,8 @@ func init() {
|
|||||||
PUBLISH: {Hand: func(m *ice.Message, arg ...string) {
|
PUBLISH: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
if strings.Contains(arg[0], LOCALHOST) {
|
if strings.Contains(arg[0], LOCALHOST) {
|
||||||
arg[0] = strings.Replace(arg[0], LOCALHOST, m.Cmd("").Append(aaa.IP), 1)
|
arg[0] = strings.Replace(arg[0], LOCALHOST, m.Cmd("").Append(aaa.IP), 1)
|
||||||
|
} else if strings.Contains(arg[0], "127.0.0.1") {
|
||||||
|
arg[0] = strings.Replace(arg[0], "127.0.0.1", m.Cmd("").Append(aaa.IP), 1)
|
||||||
}
|
}
|
||||||
m.Echo(arg[0])
|
m.Echo(arg[0])
|
||||||
}},
|
}},
|
||||||
|
@ -153,6 +153,16 @@ func init() {
|
|||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
func InnerPath(arg ...string) (dir, file string) {
|
||||||
|
p := strings.TrimPrefix(path.Join(arg...), kit.Path("")+ice.PS)
|
||||||
|
if list := strings.Split(p, ice.PS); strings.HasPrefix(p, "usr/") {
|
||||||
|
return path.Join(list[:2]...)+ice.PS, path.Join(list[2:]...)
|
||||||
|
} else if strings.HasPrefix(p, ".ish/pluged/") {
|
||||||
|
return path.Join(list[:5]...)+ice.PS, path.Join(list[5:]...)
|
||||||
|
} else {
|
||||||
|
return list[0]+ice.PS, path.Join(list[1:]...)
|
||||||
|
}
|
||||||
|
}
|
||||||
func PlugAction() ice.Actions {
|
func PlugAction() ice.Actions {
|
||||||
return ice.Actions{
|
return ice.Actions{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -109,7 +109,7 @@ func init() {
|
|||||||
}},
|
}},
|
||||||
XTERM: {Name: "xterm type=sh name text", Help: "终端", Hand: func(m *ice.Message, arg ...string) {
|
XTERM: {Name: "xterm type=sh name text", Help: "终端", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmdy(XTERM, mdb.CREATE, arg)
|
m.Cmdy(XTERM, mdb.CREATE, arg)
|
||||||
}}, FAVOR: {Help: "收藏"},
|
}}, FAVOR: {Help: "收藏"}, "listTags": {Help: "生成索引", Hand: func(m *ice.Message, arg ...string) { m.Cmd("web.code.vim.tags", nfs.LOAD) }},
|
||||||
TEMPLATE: {Hand: func(m *ice.Message, arg ...string) {
|
TEMPLATE: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmdy(TEMPLATE, kit.Ext(m.Option(mdb.FILE)), m.Option(nfs.FILE), m.Option(nfs.PATH))
|
m.Cmdy(TEMPLATE, kit.Ext(m.Option(mdb.FILE)), m.Option(nfs.FILE), m.Option(nfs.PATH))
|
||||||
}},
|
}},
|
||||||
|
3
meta.go
3
meta.go
@ -166,6 +166,9 @@ func (m *Message) Push(key string, value Any, arg ...Any) *Message {
|
|||||||
}
|
}
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
func (m *Message) EchoLine(str string, arg ...Any) *Message {
|
||||||
|
return m.Echo(str, arg...).Echo(NL)
|
||||||
|
}
|
||||||
func (m *Message) Echo(str string, arg ...Any) *Message {
|
func (m *Message) Echo(str string, arg ...Any) *Message {
|
||||||
if str == "" {
|
if str == "" {
|
||||||
return m
|
return m
|
||||||
|
@ -55,27 +55,6 @@ ish_sys_dev_run_command() {
|
|||||||
m.Echo(kit.Select("cat $1", script))
|
m.Echo(kit.Select("cat $1", script))
|
||||||
}
|
}
|
||||||
|
|
||||||
func _run_command(m *ice.Message, key string, arg ...string) {
|
|
||||||
m.Search(key, func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
|
||||||
m.Echo(kit.Join(m.Cmd(key, arg).Appendv(kit.Format(kit.Value(cmd.List, kit.Keys(len(arg), mdb.NAME)))), ice.SP))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
func _run_actions(m *ice.Message, key, sub string, arg ...string) (res []string) {
|
|
||||||
m.Search(key, func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
|
||||||
if sub == "" {
|
|
||||||
res = kit.SortedKey(cmd.Meta)
|
|
||||||
} else if len(arg)%2 == 0 {
|
|
||||||
kit.Fetch(kit.Value(cmd.Meta, sub), func(value ice.Map) { res = append(res, kit.Format(value[mdb.NAME])) })
|
|
||||||
kit.Fetch(arg, func(k, v string) { res[kit.IndexOf(res, k)] = "" })
|
|
||||||
} else {
|
|
||||||
msg := m.Cmd(key, mdb.INPUTS, kit.Select("", arg, -1), kit.Dict(arg))
|
|
||||||
res = msg.Appendv(kit.Select("", msg.Appendv(ice.MSG_APPEND), 0))
|
|
||||||
}
|
|
||||||
m.Echo(kit.Join(res, ice.SP))
|
|
||||||
})
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
const RUN = "run"
|
const RUN = "run"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -83,20 +62,11 @@ func init() {
|
|||||||
web.PP(RUN): {Actions: ice.Actions{
|
web.PP(RUN): {Actions: ice.Actions{
|
||||||
"check": {Name: "check sid*", Hand: func(m *ice.Message, arg ...string) { m.Echo(m.Cmd(SESS, m.Option(SID)).Append(GRANT)) }},
|
"check": {Name: "check sid*", Hand: func(m *ice.Message, arg ...string) { m.Echo(m.Cmd(SESS, m.Option(SID)).Append(GRANT)) }},
|
||||||
"complete": {Hand: func(m *ice.Message, arg ...string) {
|
"complete": {Hand: func(m *ice.Message, arg ...string) {
|
||||||
switch arg = kit.Split(m.Option("line")); m.Option("cword") {
|
list := kit.Split(m.Option("line"))[1:]
|
||||||
case "1":
|
if len(list) == kit.Int(m.Option("cword")) {
|
||||||
m.Echo("action ")
|
list = kit.Slice(list, 0, -1)
|
||||||
m.Echo(strings.Join(m.Cmd(ctx.COMMAND, mdb.SEARCH, ctx.COMMAND, ice.OptionFields(ctx.INDEX)).Appendv(ctx.INDEX), ice.SP))
|
|
||||||
default:
|
|
||||||
if kit.Int(m.Option("cword"))+1 == len(arg) {
|
|
||||||
arg = kit.Slice(arg, 0, -1)
|
|
||||||
}
|
|
||||||
if kit.Select("", arg, 2) == ctx.ACTION {
|
|
||||||
_run_actions(m, arg[1], kit.Select("", arg, 3), kit.Slice(arg, 4)...)
|
|
||||||
} else {
|
|
||||||
_run_command(m, arg[1], arg[2:]...)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
m.Echo(strings.Join(Complete(m, false, list...), ice.NL))
|
||||||
}},
|
}},
|
||||||
ctx.COMMAND: {Hand: func(m *ice.Message, arg ...string) {
|
ctx.COMMAND: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Search(arg[0], func(_ *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
m.Search(arg[0], func(_ *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
||||||
@ -119,3 +89,63 @@ func init() {
|
|||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Complete(m *ice.Message, detail bool, arg ...string) (res []string) {
|
||||||
|
echo := func(arg ...string) { res = append(res, arg...) }
|
||||||
|
if len(arg) < 2 || arg[1] != ctx.ACTION {
|
||||||
|
list := ctx.CmdList(m.Spawn()).Appendv(ctx.INDEX)
|
||||||
|
if len(arg) > 0 {
|
||||||
|
pre := arg[0][0 : strings.LastIndex(arg[0], ice.PT)+1]
|
||||||
|
list = kit.Simple(list, func(cmd string) bool { return strings.HasPrefix(cmd, arg[0]) }, func(cmd string) string { return strings.TrimPrefix(cmd, pre) })
|
||||||
|
}
|
||||||
|
if len(arg) > 1 || (len(list) == 1 && kit.Select("", kit.Split(arg[0], ice.PT), -1) == list[0]) {
|
||||||
|
kit.If(detail, func() { echo("func") })
|
||||||
|
m.Cmdy(arg).Search(arg[0], func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
||||||
|
field := kit.Format(kit.Value(cmd.List, kit.Keys(len(arg)-1, mdb.NAME)))
|
||||||
|
m.Table(func(index int, value ice.Maps, head []string) {
|
||||||
|
echo(value[field])
|
||||||
|
if detail {
|
||||||
|
echo(kit.Join(kit.Simple(head, func(key string) string { return key + ": " + value[key] }), ice.SP))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
kit.If(len(arg) == 1, func() { echo(ctx.ACTION) })
|
||||||
|
} else {
|
||||||
|
echo(list...)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
m.Search(arg[0], func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
||||||
|
if len(arg) > 2 && cmd.Actions != nil {
|
||||||
|
if _, ok := cmd.Actions[arg[2]]; ok {
|
||||||
|
if len(arg)%2 == 1 {
|
||||||
|
list := map[string]bool{}
|
||||||
|
kit.For(arg[3:], func(k, v string) { list[k] = true })
|
||||||
|
kit.For(cmd.Meta[arg[2]], func(value ice.Map) {
|
||||||
|
if field := kit.Format(value[mdb.NAME]); !list[field] {
|
||||||
|
echo(field)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
m.Options(arg[3:])
|
||||||
|
m.Cmdy(arg[0], mdb.INPUTS, kit.Select("", arg, -1)).Tables(func(value ice.Maps) {
|
||||||
|
v := value[m.Appendv(ice.MSG_APPEND)[0]]
|
||||||
|
kit.If(strings.Contains(v, ice.SP), func() { echo("\"" + v + "\"") }, func() { echo(v) })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(arg) < 4 {
|
||||||
|
kit.If(detail, func() { echo("func") })
|
||||||
|
kit.For(kit.SortedKey(cmd.Actions), func(sub string) {
|
||||||
|
if strings.HasPrefix(sub, kit.Select("", arg, 2)) {
|
||||||
|
if echo(sub); detail {
|
||||||
|
echo(cmd.Actions[sub].Name + ice.SP + cmd.Actions[sub].Help)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -31,10 +31,12 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch m.RenderResult(); arg[0] {
|
switch m.RenderResult(); arg[0] {
|
||||||
case web.P(cli.QRCODE), web.P("input"), web.PP(SESS):
|
case web.P(cli.QRCODE), web.PP(SESS):
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if m.Warn(m.Option(SID, strings.TrimSpace(m.Option(SID))) == "", ice.ErrNotLogin, arg) {
|
if m.Option(SID, strings.TrimSpace(m.Option(SID))) == "" && m.Option(ice.MSG_USERNAME) != "" {
|
||||||
|
return
|
||||||
|
} else if m.Warn(m.Option(SID) == "", ice.ErrNotLogin, arg) {
|
||||||
return
|
return
|
||||||
} else if msg := m.Cmd(SESS, m.Option(SID)); msg.Append(GRANT) == "" {
|
} else if msg := m.Cmd(SESS, m.Option(SID)); msg.Append(GRANT) == "" {
|
||||||
aaa.SessAuth(m, ice.Maps{aaa.USERNAME: msg.Append(aaa.USERNAME), aaa.USERNICK: msg.Append(aaa.USERNAME), aaa.USERROLE: aaa.VOID}).Options(msg.AppendSimple(aaa.USERNAME, tcp.HOSTNAME, cli.RELEASE))
|
aaa.SessAuth(m, ice.Maps{aaa.USERNAME: msg.Append(aaa.USERNAME), aaa.USERNICK: msg.Append(aaa.USERNAME), aaa.USERROLE: aaa.VOID}).Options(msg.AppendSimple(aaa.USERNAME, tcp.HOSTNAME, cli.RELEASE))
|
||||||
|
@ -34,7 +34,7 @@ func init() {
|
|||||||
ctx.ProcessField(m, "", kit.Split(m.Option(mdb.TEXT)))
|
ctx.ProcessField(m, "", kit.Split(m.Option(mdb.TEXT)))
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
FAVOR: {Name: "favor zone=demo type name text pwd", Help: "收藏", Hand: func(m *ice.Message, arg ...string) {
|
FAVOR: {Name: "favor zone*=demo type name text pwd", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmdy(FAVOR, mdb.INSERT, arg, m.OptionSimple(aaa.USERNAME, tcp.HOSTNAME))
|
m.Cmdy(FAVOR, mdb.INSERT, arg, m.OptionSimple(aaa.USERNAME, tcp.HOSTNAME))
|
||||||
}},
|
}},
|
||||||
}, mdb.PageListAction(mdb.FIELD, "time,id,type,name,text,pwd,username,hostname")), Hand: func(m *ice.Message, arg ...string) {
|
}, mdb.PageListAction(mdb.FIELD, "time,id,type,name,text,pwd,username,hostname")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -85,7 +85,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
from, days, adds, dels, commit := "", 0, 0, 0, 0
|
from, days, adds, dels, commit := "", 0, 0, 0, 0
|
||||||
kit.SplitKV(ice.NL, "commit:", _git_cmds(m, args...), func(text string, ls []string) {
|
kit.SplitKV(ice.NL, "commit:", _git_cmds(m, args...), func(text string, ls []string) {
|
||||||
m.Debug("what %v %v", text, ls)
|
|
||||||
add, del := "0", "0"
|
add, del := "0", "0"
|
||||||
for _, v := range kit.Split(strings.TrimSpace(kit.Select("", ls, -1)), ice.FS) {
|
for _, v := range kit.Split(strings.TrimSpace(kit.Select("", ls, -1)), ice.FS) {
|
||||||
switch {
|
switch {
|
||||||
|
@ -97,7 +97,7 @@ func (s input) List(m *ice.Message, arg ...string) {
|
|||||||
for i := 0; i < kit.Int(10); i++ {
|
for i := 0; i < kit.Int(10); i++ {
|
||||||
if line, e := bio.Read(); e != nil {
|
if line, e := bio.Read(); e != nil {
|
||||||
break
|
break
|
||||||
} else if len(line) > 3 {
|
} else if len(line) > 6 {
|
||||||
m.Push(mdb.ID, line[3]).Push(CODE, line[2]).Push(TEXT, line[4]).Push(WEIGHT, line[6])
|
m.Push(mdb.ID, line[3]).Push(CODE, line[2]).Push(TEXT, line[4]).Push(WEIGHT, line[6])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import (
|
|||||||
"shylinux.com/x/icebergs/base/nfs"
|
"shylinux.com/x/icebergs/base/nfs"
|
||||||
"shylinux.com/x/icebergs/base/web"
|
"shylinux.com/x/icebergs/base/web"
|
||||||
"shylinux.com/x/icebergs/core/code"
|
"shylinux.com/x/icebergs/core/code"
|
||||||
|
kit "shylinux.com/x/toolkits"
|
||||||
)
|
)
|
||||||
|
|
||||||
const FAVOR = "favor"
|
const FAVOR = "favor"
|
||||||
@ -17,28 +18,25 @@ const FAVOR = "favor"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
FAVOR: {Name: "favor zone id auto insert", Help: "收藏夹", Actions: ice.MergeActions(ice.Actions{
|
FAVOR: {Name: "favor zone id auto insert", Help: "收藏夹", Actions: ice.MergeActions(ice.Actions{
|
||||||
mdb.INSERT: {Name: "insert zone=数据结构 type name=hi text=hello file line"},
|
code.INNER: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
code.INNER: {Help: "源码", Hand: func(m *ice.Message, arg ...string) {
|
dir, file := code.InnerPath(kit.Select("", m.Option(cli.PWD), !path.IsAbs(m.Option(nfs.FILE))), m.Option(nfs.FILE))
|
||||||
if len(arg) > 0 && arg[0] == ice.RUN {
|
ctx.ProcessField(m, "", []string{dir, file, m.Option(nfs.LINE)}, arg...)
|
||||||
ctx.ProcessField(m, "", nil, arg...)
|
|
||||||
} else {
|
|
||||||
p := path.Join(m.Option(cli.PWD), m.Option(nfs.FILE))
|
|
||||||
ctx.ProcessField(m, "", []string{path.Dir(p) + ice.PS, path.Base(p), m.Option(nfs.LINE)})
|
|
||||||
}
|
|
||||||
}},
|
}},
|
||||||
}, mdb.ZoneAction(mdb.FIELD, "time,id,type,name,text,file,line,pwd")), Hand: func(m *ice.Message, arg ...string) {
|
}, mdb.ZoneAction(mdb.FIELD, "time,id,type,name,text,file,line,pwd")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if mdb.ZoneSelect(m, arg...).PushAction(code.INNER); len(arg) == 0 {
|
if mdb.ZoneSelect(m, arg...); len(arg) == 0 {
|
||||||
m.Action(mdb.EXPORT, mdb.IMPORT)
|
m.Action(mdb.EXPORT, mdb.IMPORT)
|
||||||
|
} else {
|
||||||
|
m.PushAction(code.INNER)
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
web.PP(FAVOR): {Actions: ice.Actions{
|
web.PP(FAVOR): {Actions: ice.Actions{
|
||||||
mdb.INSERT: {Hand: func(m *ice.Message, arg ...string) { m.Cmd(FAVOR, mdb.INSERT) }},
|
mdb.INSERT: {Hand: func(m *ice.Message, arg ...string) { m.Cmd(FAVOR, mdb.INSERT) }},
|
||||||
mdb.SELECT: {Hand: func(m *ice.Message, arg ...string) {
|
mdb.SELECT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(FAVOR, func(value ice.Maps) { m.Echo(value[mdb.ZONE]).Echo(ice.NL) })
|
m.Cmd(FAVOR, func(value ice.Maps) { m.EchoLine(value[mdb.ZONE]) })
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, arg ...string) {
|
}, Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(FAVOR, m.Option(mdb.ZONE), func(value ice.Maps) {
|
m.Cmd(FAVOR, m.Option(mdb.ZONE), func(value ice.Maps) {
|
||||||
m.Echo("%v\n", m.Option(mdb.ZONE)).Echo("%v:%v:%v:(%v): %v\n", value[nfs.FILE], value[nfs.LINE], "1", value[mdb.NAME], value[mdb.TEXT])
|
m.EchoLine(m.Option(mdb.ZONE)).EchoLine("%v:%v:%v:(%v): %v", value[nfs.FILE], value[nfs.LINE], "1", value[mdb.NAME], value[mdb.TEXT])
|
||||||
})
|
})
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
|
@ -4,10 +4,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/cli"
|
|
||||||
"shylinux.com/x/icebergs/base/ctx"
|
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
"shylinux.com/x/icebergs/base/web"
|
"shylinux.com/x/icebergs/base/web"
|
||||||
|
"shylinux.com/x/icebergs/misc/bash"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,38 +16,19 @@ func init() {
|
|||||||
const (
|
const (
|
||||||
CMDS = "cmds"
|
CMDS = "cmds"
|
||||||
WUBI = "wubi"
|
WUBI = "wubi"
|
||||||
ICE_ = "ice "
|
|
||||||
)
|
)
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
INPUT: {Name: "input hash auto export import", Help: "输入法", Actions: mdb.HashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,hash,type,name,text")},
|
INPUT: {Name: "input hash auto export import", Help: "输入法", Actions: mdb.HashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,hash,type,name,text")},
|
||||||
web.P(INPUT): {Hand: func(m *ice.Message, arg ...string) {
|
web.P(INPUT): {Hand: func(m *ice.Message, arg ...string) {
|
||||||
if arg[0] == ice.PT {
|
if arg[0] == ice.PT {
|
||||||
|
|
||||||
} else if strings.HasPrefix(arg[0], "ice") {
|
} else if strings.Contains(m.Option("pre"), "ice") {
|
||||||
args := kit.Split(arg[0])
|
m.EchoLine(kit.Join(bash.Complete(m, true, kit.Split(strings.Split(m.Option("pre")+m.Option("cmds"), "ice")[1])...), ice.NL))
|
||||||
if list := ctx.CmdList(m.Spawn()).Appendv(ctx.INDEX); len(args) == 1 || kit.IndexOf(list, args[1]) == -1 {
|
// mdb.HashCreate(m.Spawn(), kit.SimpleKV("", CMDS, strings.TrimSpace(arg[0]), m.Result()))
|
||||||
if len(args) > 1 {
|
} else if m.Cmdy(TAGS, INPUT, arg[0], m.Option("pre")); len(m.Result()) > 0 {
|
||||||
list = kit.Simple(list, func(item string) bool { return strings.HasPrefix(item, args[1]) })
|
// mdb.HashCreate(m, kit.SimpleKV("", TAGS, arg[0], m.Result()))
|
||||||
}
|
|
||||||
m.Echo(ICE_ + kit.Join(list, ice.NL+ICE_)).Echo(ice.NL)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
msg := m.Cmd(args[1:])
|
|
||||||
if msg.IsErrNotFound() {
|
|
||||||
msg.SetResult().Cmdy(cli.SYSTEM, args[1:])
|
|
||||||
}
|
|
||||||
if msg.Result() == "" {
|
|
||||||
msg.Table()
|
|
||||||
}
|
|
||||||
m.Echo(arg[0]).Echo(ice.NL).Search(args[1], func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
|
||||||
m.Echo(arg[0] + ice.SP + kit.Join(msg.Appendv(kit.Format(kit.Value(cmd.List, kit.Keys(len(args)-2, mdb.NAME)))), ice.NL+arg[0]+ice.SP)).Echo(ice.NL)
|
|
||||||
}).Copy(msg)
|
|
||||||
kit.Fetch(kit.UnMarshal(msg.Option(ice.MSG_STATUS)), func(index int, value ice.Map) { m.Echo("%s: %v ", value[mdb.NAME], value[mdb.VALUE]) })
|
|
||||||
mdb.HashCreate(m.Spawn(), kit.SimpleKV("", CMDS, strings.TrimSpace(strings.Join(args[1:], ice.SP)), m.Result()))
|
|
||||||
} else if m.Cmdy(TAGS, INPUT, arg[0], m.Option("pre")); m.Length() > 0 {
|
|
||||||
mdb.HashCreate(m, kit.SimpleKV("", TAGS, arg[0], m.Result()))
|
|
||||||
} else if m.Cmdy("web.code.input.wubi", INPUT, arg[0]); len(m.Result()) > 0 {
|
} else if m.Cmdy("web.code.input.wubi", INPUT, arg[0]); len(m.Result()) > 0 {
|
||||||
mdb.HashCreate(m.Spawn(), kit.SimpleKV("", WUBI, arg[0], m.Result()))
|
// mdb.HashCreate(m.Spawn(), kit.SimpleKV("", WUBI, arg[0], m.Result()))
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
|
@ -19,19 +19,17 @@ func init() {
|
|||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
SYNC: {Name: "sync id auto page export import", Help: "同步流", Actions: ice.MergeActions(ice.Actions{
|
SYNC: {Name: "sync id auto page export import", Help: "同步流", Actions: ice.MergeActions(ice.Actions{
|
||||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(FAVOR, mdb.INPUTS, arg) }},
|
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(FAVOR, mdb.INPUTS, arg) }},
|
||||||
code.INNER: {Help: "源码", Hand: func(m *ice.Message, arg ...string) {
|
code.INNER: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
if len(arg) > 0 && arg[0] == ice.RUN {
|
p := path.Join(m.Option(cli.PWD), m.Option(BUF))
|
||||||
ctx.ProcessField(m, "", nil, arg...)
|
ctx.ProcessField(m, "", []string{path.Dir(p) + ice.PS, path.Base(p), m.Option(ROW)}, arg...)
|
||||||
} else {
|
|
||||||
p := path.Join(m.Option(cli.PWD), m.Option(BUF))
|
|
||||||
ctx.ProcessField(m, "", []string{path.Dir(p) + ice.PS, path.Base(p), m.Option(ROW)})
|
|
||||||
}
|
|
||||||
}},
|
}},
|
||||||
FAVOR: {Name: "favor zone*=some type name text pwd buf row", Help: "收藏", Hand: func(m *ice.Message, arg ...string) {
|
FAVOR: {Name: "favor zone*=some type name text pwd buf row", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(FAVOR, mdb.INSERT, m.OptionSimple(mdb.ZONE, "type,name,text,pwd"), nfs.FILE, m.Option(BUF), nfs.LINE, m.Option(ROW))
|
m.Cmd(FAVOR, mdb.INSERT, m.OptionSimple(mdb.ZONE, "type,name,text,pwd"), nfs.FILE, m.Option(BUF), nfs.LINE, m.Option(ROW))
|
||||||
}},
|
}},
|
||||||
}, mdb.PageListAction(mdb.FIELD, "time,id,type,name,text,pwd,buf,row,col")), Hand: func(m *ice.Message, arg ...string) {
|
}, mdb.PageListAction(mdb.FIELD, "time,id,type,name,text,pwd,buf,row,col")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
mdb.PageListSelect(m, arg...).PushAction(code.INNER, FAVOR)
|
if mdb.PageListSelect(m, arg...); len(kit.Slice(arg, 0, 2)) > 0 {
|
||||||
|
m.PushAction(code.INNER, FAVOR)
|
||||||
|
}
|
||||||
}},
|
}},
|
||||||
web.P(SYNC): {Hand: func(m *ice.Message, arg ...string) {
|
web.P(SYNC): {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(SYNC, mdb.INSERT, mdb.TYPE, VIMRC, mdb.NAME, arg[0], mdb.TEXT, kit.Select(m.Option(ARG), m.Option(SUB)), m.OptionSimple(cli.PWD, BUF, ROW, COL))
|
m.Cmd(SYNC, mdb.INSERT, mdb.TYPE, VIMRC, mdb.NAME, arg[0], mdb.TEXT, kit.Select(m.Option(ARG), m.Option(SUB)), m.OptionSimple(cli.PWD, BUF, ROW, COL))
|
||||||
|
169
misc/vim/tags.go
169
misc/vim/tags.go
@ -13,153 +13,102 @@ import (
|
|||||||
"shylinux.com/x/icebergs/base/web"
|
"shylinux.com/x/icebergs/base/web"
|
||||||
"shylinux.com/x/icebergs/core/code"
|
"shylinux.com/x/icebergs/core/code"
|
||||||
"shylinux.com/x/icebergs/core/wiki"
|
"shylinux.com/x/icebergs/core/wiki"
|
||||||
|
"shylinux.com/x/icebergs/misc/bash"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
)
|
)
|
||||||
|
|
||||||
func _tags_split(pre, col string) []string {
|
|
||||||
ls := kit.Split(pre[:kit.Int(col)-1])
|
|
||||||
ls[len(ls)-1] += kit.Split(pre[kit.Int(col)-1:])[0]
|
|
||||||
return ls
|
|
||||||
}
|
|
||||||
func _tags_field(m *ice.Message, arg ...string) {
|
|
||||||
if arg[0] == "" {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
pre, sp := "", ""
|
|
||||||
if word := kit.Slice(kit.Split(arg[1]+arg[0]), -1)[0]; arg[0] == ice.SP {
|
|
||||||
sp = ice.SP
|
|
||||||
} else if strings.HasSuffix(word, ice.PT) {
|
|
||||||
pre = strings.TrimSuffix(word, ice.PT)
|
|
||||||
} else if p := kit.Split(word, ice.PT); true {
|
|
||||||
sp, pre = p[len(p)-1], word
|
|
||||||
}
|
|
||||||
list0, list := map[string]bool{}, map[string]bool{}
|
|
||||||
push := func(index string) {
|
|
||||||
if strings.HasPrefix(index, pre) {
|
|
||||||
p := kit.Split(sp+strings.TrimPrefix(index, pre), ice.PT)[0]
|
|
||||||
list0[p+kit.Select("", ice.PT, !strings.HasSuffix(index, p))] = true
|
|
||||||
}
|
|
||||||
list[strings.TrimPrefix(index, kit.Join(kit.Slice(kit.Split(pre, ice.PT), 0, -1), ice.PT)+ice.PT)] = true
|
|
||||||
}
|
|
||||||
ctx.CmdList(m).Tables(func(value ice.Maps) {
|
|
||||||
if ls := kit.Split(pre, ice.PT); len(ls) == 1 && strings.Contains(value[ctx.INDEX], pre) && !strings.HasSuffix(arg[0], ice.PT) {
|
|
||||||
push(value[ctx.INDEX])
|
|
||||||
} else if len(ls) > 1 && strings.HasPrefix(value[ctx.INDEX], kit.Join(ls[:len(ls)-1], ice.PT)) && strings.Contains(value[ctx.INDEX], ls[len(ls)-1]) && !strings.HasSuffix(arg[0], ice.PT) {
|
|
||||||
push(value[ctx.INDEX])
|
|
||||||
} else if strings.HasPrefix(value[ctx.INDEX], pre) {
|
|
||||||
res := sp + strings.TrimPrefix(value[ctx.INDEX], pre)
|
|
||||||
ls := kit.Split(res, ice.PT)
|
|
||||||
if len(ls) == 0 {
|
|
||||||
return
|
|
||||||
} else if len(ls) > 1 {
|
|
||||||
ls[0] += ice.PT
|
|
||||||
}
|
|
||||||
if strings.HasPrefix(res, ice.PT) {
|
|
||||||
list[ice.PT+ls[0]] = true
|
|
||||||
} else {
|
|
||||||
list[ls[0]] = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
kit.Fetch(list0, func(k string) { m.Echo("%s\n", k) })
|
|
||||||
kit.Fetch(list, func(k string) { m.Echo("%s\n", k) })
|
|
||||||
}
|
|
||||||
func _tags_input(m *ice.Message, arg ...string) {
|
func _tags_input(m *ice.Message, arg ...string) {
|
||||||
if kit.Ext(m.Option(BUF)) == nfs.SHY && arg[1] == "" {
|
if kit.Ext(m.Option(BUF)) == nfs.SHY {
|
||||||
kit.Fetch([]string{"field", "shell", "refer", "section", "chapter", "title"}, func(k string) {
|
if arg[1] == "" {
|
||||||
kit.If(strings.HasPrefix(k, arg[0]), func() { m.Echo("%s \n", k) })
|
kit.For([]string{"field", "shell", "refer", "section", "chapter", "title"}, func(k string) { kit.If(strings.HasPrefix(k, arg[0]), func() { m.EchoLine(k) }) })
|
||||||
})
|
|
||||||
_tags_field(m, arg...)
|
|
||||||
return
|
|
||||||
} else if arg[1] == "" {
|
|
||||||
_tags_field(m, arg...)
|
|
||||||
return
|
|
||||||
} else if kit.Ext(m.Option(BUF)) == nfs.SHY && strings.HasPrefix(arg[1], "field") {
|
|
||||||
_tags_field(m, arg...)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
name := kit.Select("", kit.Slice(kit.Split(arg[1], "\t \n."), -1), 0)
|
|
||||||
switch name {
|
|
||||||
case "can":
|
|
||||||
mdb.ZoneSelectCB(m, "", func(value ice.Maps) { m.Echo(value[mdb.NAME] + ice.NL) })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
mdb.ZoneSelectCB(m, name, func(value ice.Maps) {
|
|
||||||
if !strings.Contains(value[mdb.NAME], arg[0]) && arg[0] != ice.PT {
|
|
||||||
return
|
|
||||||
} else if m.Length() == 0 {
|
|
||||||
m.Echo("func" + ice.NL)
|
|
||||||
}
|
}
|
||||||
m.Echo(value[mdb.NAME] + ice.NL)
|
m.EchoLine(kit.Join(bash.Complete(m, true, kit.Split(m.Option(PRE)+kit.Select("", ice.SP, !strings.HasSuffix(m.Option(PRE), ice.PT))+m.Option("cmds"))...), ice.SP+ice.NL))
|
||||||
m.Echo("%s: %s"+ice.NL, value[mdb.NAME], strings.Split(value[mdb.TEXT], ice.NL)[0])
|
return
|
||||||
})
|
}
|
||||||
|
switch name := kit.Select("", kit.Slice(kit.Split(arg[1], "\t \n."), -1), 0); name {
|
||||||
|
case "can", "sup", "sub":
|
||||||
|
mdb.ZoneSelect(m).Tables(func(value ice.Maps) {
|
||||||
|
if strings.Contains(value[mdb.ZONE], arg[0]) || arg[0] == ice.PT {
|
||||||
|
m.EchoLine(value[mdb.ZONE])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
default:
|
||||||
|
mdb.ZoneSelectCB(m.Echo("func").Echo(ice.NL), name, func(value ice.Maps) {
|
||||||
|
if strings.Contains(value[mdb.NAME], arg[0]) || arg[0] == ice.PT {
|
||||||
|
m.EchoLine(value[mdb.NAME]+kit.Select("", "(", value[mdb.TYPE] == "function")).EchoLine("%s: %s", value[mdb.NAME], strings.Split(value[mdb.TEXT], ice.NL)[0])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const TAGS = "tags"
|
const TAGS = "tags"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
const (
|
|
||||||
MODULE = "module"
|
|
||||||
PATTERN = "pattern"
|
|
||||||
|
|
||||||
ONIMPORT = "onimport"
|
|
||||||
ONACTION = "onaction"
|
|
||||||
ONEXPORT = "onexport"
|
|
||||||
|
|
||||||
defs_pattern = "4\n%s\n/\\<%s: /\n"
|
|
||||||
func_pattern = "4\n%s\n/\\<%s: \\(shy\\|func\\)/\n"
|
|
||||||
libs_pattern = "4\nusr/volcanos/lib/%s.js\n/\\<%s: \\(shy\\|func\\)/\n"
|
|
||||||
)
|
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
TAGS: {Name: "tags zone id auto insert", Help: "索引", Actions: ice.MergeActions(ice.Actions{
|
TAGS: {Name: "tags zone id auto insert", Help: "索引", Actions: ice.MergeActions(ice.Actions{
|
||||||
"listTags": {Help: "索引", Hand: func(m *ice.Message, arg ...string) {
|
nfs.LOAD: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
kit.Fetch(kit.UnMarshal(m.Option(mdb.TEXT)), func(value ice.Map) {
|
kit.For(kit.UnMarshal(m.Option(mdb.TEXT)), func(value ice.Map) { mdb.ZoneInsert(m, value[mdb.ZONE], kit.Simple(value)) })
|
||||||
kit.If(value != nil, func() { mdb.ZoneInsert(m, value[mdb.ZONE], kit.Simple(value)) })
|
|
||||||
})
|
|
||||||
}},
|
}},
|
||||||
code.INNER: {Hand: func(m *ice.Message, arg ...string) { ctx.ProcessField(m, "", m.OptionSplit("path,file,line"), arg...) }},
|
|
||||||
INPUT: {Hand: func(m *ice.Message, arg ...string) { _tags_input(m, arg...) }},
|
INPUT: {Hand: func(m *ice.Message, arg ...string) { _tags_input(m, arg...) }},
|
||||||
}, mdb.ZoneAction(mdb.FIELD, "time,id,type,name,text,path,file,line"), ctx.ACTION, code.INNER), Hand: func(m *ice.Message, arg ...string) {
|
code.INNER: {Hand: func(m *ice.Message, arg ...string) { ctx.ProcessField(m, "", m.OptionSplit("path,file,line"), arg...) }},
|
||||||
|
}, mdb.ZoneAction(mdb.FIELD, "time,id,type,name,text,path,file,line")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if mdb.ZoneSelectAll(m, arg...); len(arg) == 0 {
|
if mdb.ZoneSelectAll(m, arg...); len(arg) == 0 {
|
||||||
m.Action("listTags", mdb.EXPORT, mdb.IMPORT)
|
m.Action(nfs.LOAD, mdb.EXPORT, mdb.IMPORT)
|
||||||
|
} else {
|
||||||
|
m.PushAction(code.INNER)
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
web.P(TAGS): {Actions: ice.Actions{
|
web.PP(TAGS): {Actions: ice.Actions{
|
||||||
tcp.SERVER: {Hand: func(m *ice.Message, arg ...string) {
|
tcp.SERVER: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
switch args := _tags_split(m.Option(PRE), m.Option(COL)); args[0] {
|
switch args := kit.Split(m.Option(PRE)); args[0] {
|
||||||
case cli.QRCODE:
|
case cli.QRCODE:
|
||||||
m.Echo(`!curl "http://localhost:9020/code/bash/qrcode?text=%s"`, args[1])
|
Qrcode(m, args[1])
|
||||||
case wiki.FIELD:
|
case wiki.FIELD:
|
||||||
m.Echo(`!curl "http://localhost:9020/code/bash/qrcode?text=%s"`, kit.Format("http://2022.shylinux.com:9020/chat/cmd/%s?topic=black", args[1]))
|
m.Option(ice.MSG_USERWEB, m.Cmdx(web.SPACE, web.DOMAIN))
|
||||||
|
Qrcode(m, web.MergePodCmd(m, "", kit.Select(args[1], args, 2)))
|
||||||
|
default:
|
||||||
|
m.Option(ice.MSG_USERWEB, m.Cmdx(web.SPACE, web.DOMAIN))
|
||||||
|
Qrcode(m, web.MergePodCmd(m, "", args[0]))
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
nfs.SOURCE: {Hand: func(m *ice.Message, arg ...string) {
|
nfs.SOURCE: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
switch args := _tags_split(m.Option(PRE), m.Option(COL)); args[0] {
|
switch args := kit.Split(m.Option(PRE)); args[0] {
|
||||||
case cli.QRCODE:
|
case cli.QRCODE:
|
||||||
m.Echo(`!curl "http://localhost:9020/code/bash/qrcode?text=%s"`, args[1])
|
Qrcode(m, args[1])
|
||||||
case wiki.FIELD:
|
case wiki.FIELD:
|
||||||
m.Search(kit.Select(args[1], args, 2), func(key string, cmd *ice.Command) {
|
m.Search(kit.Select(args[1], args, 2), func(key string, cmd *ice.Command) {
|
||||||
ls := kit.Split(cmd.GetFileLines(), ice.DF)
|
ls := kit.Split(cmd.GetFileLines(), ice.DF)
|
||||||
m.Echo("vi +%s %s", ls[1], ls[0])
|
m.Echo("vi +%s %s", ls[1], ls[0])
|
||||||
})
|
})
|
||||||
|
default:
|
||||||
|
m.Search(args[0], func(key string, cmd *ice.Command) {
|
||||||
|
ls := kit.Split(cmd.GetFileLines(), ice.DF)
|
||||||
|
m.Echo("vi +%s %s", ls[1], ls[0])
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, arg ...string) {
|
}, Hand: func(m *ice.Message, arg ...string) {
|
||||||
switch m.Option(MODULE) {
|
const (
|
||||||
|
ONIMPORT = "onimport"
|
||||||
|
ONACTION = "onaction"
|
||||||
|
ONEXPORT = "onexport"
|
||||||
|
)
|
||||||
|
switch m.Option(mdb.ZONE) {
|
||||||
case ONIMPORT, ONACTION, ONEXPORT:
|
case ONIMPORT, ONACTION, ONEXPORT:
|
||||||
m.Echo(func_pattern, m.Option(BUF), m.Option(PATTERN))
|
m.Echo(m.Option(BUF))
|
||||||
case "msg", "res":
|
case "msg", "res":
|
||||||
m.Echo(libs_pattern, ice.MISC, m.Option(PATTERN))
|
m.Echo("usr/volcanos/lib/misc.js")
|
||||||
default:
|
default:
|
||||||
if mdb.ZoneSelectCB(m, m.Option(MODULE), func(value ice.Maps) {
|
if mdb.ZoneSelectAll(m, m.Option(mdb.ZONE)).Tables(func(value ice.Maps) {
|
||||||
if value[mdb.NAME] == m.Option(PATTERN) {
|
kit.If(value[mdb.NAME] == m.Option(mdb.NAME), func() { m.Echo(path.Join(value[nfs.PATH], value[nfs.FILE])) })
|
||||||
m.Echo(kit.Select(defs_pattern, func_pattern, value[mdb.TYPE] == "function"),
|
}); m.Result() == "" {
|
||||||
path.Join(value[nfs.PATH], value[nfs.FILE]), m.Option(PATTERN))
|
m.Echo("usr/volcanos/proto.js")
|
||||||
}
|
|
||||||
}); m.Length() == 0 {
|
|
||||||
m.Echo(defs_pattern, "usr/volcanos/proto.js", m.Option(PATTERN))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Qrcode(m *ice.Message, arg ...string) {
|
||||||
|
m.Echo(`!curl "http://localhost:9020/code/bash/qrcode?text=%s"`, arg[0])
|
||||||
|
}
|
||||||
|
@ -9,7 +9,7 @@ const VIMRC = "vimrc"
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
VIM: {Name: "vim", Actions: code.PlugAction()},
|
VIM: {Actions: code.PlugAction()},
|
||||||
VIMRC: {Name: "vimrc", Actions: code.PlugAction()},
|
VIMRC: {Actions: code.PlugAction()},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user