forked from x/ContextOS
opt note
This commit is contained in:
parent
5554b503a0
commit
b6731e04ec
@ -42,14 +42,14 @@ bind i display-panes
|
|||||||
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||||
|
|
||||||
bind b break-pane
|
bind b break-pane
|
||||||
# bind u split-window
|
bind u split-window
|
||||||
# bind v split-window -h
|
bind v split-window -h
|
||||||
# bind C-u split-window -f
|
bind C-u split-window -f
|
||||||
# bind C-v split-window -f -h
|
bind C-v split-window -f -h
|
||||||
bind u split-window -c "#{pane_current_path}"
|
# bind u split-window -c "#{pane_current_path}"
|
||||||
bind v split-window -h -c "#{pane_current_path}"
|
# bind v split-window -h -c "#{pane_current_path}"
|
||||||
bind C-u split-window -f -c "#{pane_current_path}"
|
# bind C-u split-window -f -c "#{pane_current_path}"
|
||||||
bind C-v split-window -f -h -c "#{pane_current_path}"
|
# bind C-v split-window -f -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
bind h select-pane -L
|
bind h select-pane -L
|
||||||
bind l select-pane -R
|
bind l select-pane -R
|
||||||
|
@ -78,9 +78,8 @@ let g:syntastic_quiet_messages = { "regex": [
|
|||||||
\ ] }
|
\ ] }
|
||||||
|
|
||||||
Plug 'Valloric/YouCompleteMe'
|
Plug 'Valloric/YouCompleteMe'
|
||||||
let g:ycm_confirm_extra_conf=1
|
let g:syntastic_enable_signs = 1
|
||||||
let g:syntastic_enable_signs=1
|
let g:ycm_confirm_extra_conf=0
|
||||||
let g:ycm_python_binary_path='/usr/bin/python'
|
|
||||||
nnoremap gd :YcmCompleter GoToDeclaration<CR>
|
nnoremap gd :YcmCompleter GoToDeclaration<CR>
|
||||||
nnoremap gD :YcmCompleter GoToReferences<CR>
|
nnoremap gD :YcmCompleter GoToReferences<CR>
|
||||||
|
|
||||||
@ -137,7 +136,6 @@ nnoremap j gj
|
|||||||
nnoremap k gk
|
nnoremap k gk
|
||||||
|
|
||||||
nnoremap <C-M> :make<CR>
|
nnoremap <C-M> :make<CR>
|
||||||
inoremap <C-M> <ESC>:make<CR>i
|
|
||||||
|
|
||||||
nnoremap df :FZF<CR>
|
nnoremap df :FZF<CR>
|
||||||
inoremap df _
|
inoremap df _
|
||||||
@ -163,8 +161,6 @@ function! Config(type)
|
|||||||
set filetype=xml
|
set filetype=xml
|
||||||
elseif a:type == "css"
|
elseif a:type == "css"
|
||||||
set filetype=css
|
set filetype=css
|
||||||
elseif a:type == "txt"
|
|
||||||
set noexpandtab
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -177,7 +173,6 @@ autocmd BufNewFile,BufReadPost *.json call Config("json")
|
|||||||
|
|
||||||
autocmd BufNewFile,BufReadPost *.wxml call Config("xml")
|
autocmd BufNewFile,BufReadPost *.wxml call Config("xml")
|
||||||
autocmd BufNewFile,BufReadPost *.wxss call Config("css")
|
autocmd BufNewFile,BufReadPost *.wxss call Config("css")
|
||||||
autocmd BufNewFile,BufReadPost *.txt call Config("txt")
|
|
||||||
|
|
||||||
command! RR wa | source ~/.vimrc |e
|
command! RR wa | source ~/.vimrc |e
|
||||||
command! SS mksession! etc/session.vim
|
command! SS mksession! etc/session.vim
|
||||||
|
@ -7,8 +7,6 @@ syntax match shyCache "\(^\|\t\| \|$(\)cache\>"
|
|||||||
syntax match shyString "'[^']*'"
|
syntax match shyString "'[^']*'"
|
||||||
syntax match shyString "\"[^\"]*\""
|
syntax match shyString "\"[^\"]*\""
|
||||||
syntax match shyNumber "-\=\<\d\+\>#\="
|
syntax match shyNumber "-\=\<\d\+\>#\="
|
||||||
syntax match shyNumber "false"
|
|
||||||
syntax match shyNumber "true"
|
|
||||||
syntax match shVariable "\$[_a-zA-Z0-9]\+\>"
|
syntax match shVariable "\$[_a-zA-Z0-9]\+\>"
|
||||||
syntax match shVariable "@[_a-zA-Z0-9]\+\>"
|
syntax match shVariable "@[_a-zA-Z0-9]\+\>"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
~mdb
|
~mdb
|
||||||
config save note.json note
|
# config save note.json note
|
||||||
~aaa
|
~aaa
|
||||||
config save auth.json auth
|
config save auth.json auth
|
||||||
|
|
||||||
|
@ -705,7 +705,7 @@ var Index = &Context{Name: "ctx", Help: "模块中心", Server: &CTX{},
|
|||||||
|
|
||||||
return !all
|
return !all
|
||||||
})
|
})
|
||||||
m.Table()
|
m.Sort("key").Table()
|
||||||
case "list":
|
case "list":
|
||||||
if m.Cap("list_count") == "" {
|
if m.Cap("list_count") == "" {
|
||||||
break
|
break
|
||||||
|
@ -128,6 +128,10 @@ var Index = &ctx.Context{Name: "log", Help: "日志中心",
|
|||||||
"call": map[string]interface{}{"value": map[string]interface{}{"file": "debug.log", "meta": []interface{}{"time", "ship"}}},
|
"call": map[string]interface{}{"value": map[string]interface{}{"file": "debug.log", "meta": []interface{}{"time", "ship"}}},
|
||||||
"back": map[string]interface{}{"value": map[string]interface{}{"file": "debug.log", "meta": []interface{}{"time", "ship"}}},
|
"back": map[string]interface{}{"value": map[string]interface{}{"file": "debug.log", "meta": []interface{}{"time", "ship"}}},
|
||||||
|
|
||||||
|
"sync": map[string]interface{}{"value": map[string]interface{}{"file": "debug.log", "meta": []interface{}{"time", "ship"}}},
|
||||||
|
"recv": map[string]interface{}{"value": map[string]interface{}{"file": "debug.log", "meta": []interface{}{"time", "ship"}}},
|
||||||
|
"send": map[string]interface{}{"value": map[string]interface{}{"file": "debug.log", "meta": []interface{}{"time", "ship"}}},
|
||||||
|
|
||||||
"bench": map[string]interface{}{"value": map[string]interface{}{"file": "bench.log", "meta": []interface{}{"time", "ship"}}},
|
"bench": map[string]interface{}{"value": map[string]interface{}{"file": "bench.log", "meta": []interface{}{"time", "ship"}}},
|
||||||
"begin": map[string]interface{}{"value": map[string]interface{}{"file": "bench.log", "meta": []interface{}{"time", "ship"}, "color_begin": "\033[31m", "color_end": "\033[0m"}},
|
"begin": map[string]interface{}{"value": map[string]interface{}{"file": "bench.log", "meta": []interface{}{"time", "ship"}, "color_begin": "\033[31m", "color_end": "\033[0m"}},
|
||||||
"start": map[string]interface{}{"value": map[string]interface{}{"file": "bench.log", "meta": []interface{}{"time", "ship"}, "color_begin": "\033[31m", "color_end": "\033[0m"}},
|
"start": map[string]interface{}{"value": map[string]interface{}{"file": "bench.log", "meta": []interface{}{"time", "ship"}, "color_begin": "\033[31m", "color_end": "\033[0m"}},
|
||||||
|
@ -70,8 +70,8 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
"temp_view": &ctx.Config{Name: "temp_view", Value: map[string]interface{}{}, Help: "缓存数据"},
|
"temp_view": &ctx.Config{Name: "temp_view", Value: map[string]interface{}{}, Help: "缓存数据"},
|
||||||
|
|
||||||
"note_view": &ctx.Config{Name: "note_view", Value: map[string]interface{}{
|
"note_view": &ctx.Config{Name: "note_view", Value: map[string]interface{}{
|
||||||
"default": []interface{}{"key", "create_time", "type", "name", "value"},
|
"default": []interface{}{"key", "create_time", "type", "name", "model", "value"},
|
||||||
"base": []interface{}{"key", "create_time", "type", "name", "value"},
|
"base": []interface{}{"key", "create_time", "type", "name", "model", "value"},
|
||||||
"full": []interface{}{"key", "create_time", "access_time", "type", "name", "model", "value", "view", "data", "ship"},
|
"full": []interface{}{"key", "create_time", "access_time", "type", "name", "model", "value", "view", "data", "ship"},
|
||||||
}, Help: "数据视图"},
|
}, Help: "数据视图"},
|
||||||
"note": &ctx.Config{Name: "note", Value: map[string]interface{}{
|
"note": &ctx.Config{Name: "note", Value: map[string]interface{}{
|
||||||
@ -83,6 +83,12 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
},
|
},
|
||||||
"81c5709d091eb04bd31ee751c3f81023": map[string]interface{}{
|
"81c5709d091eb04bd31ee751c3f81023": map[string]interface{}{
|
||||||
"create_time": "1990-07-30 07:08:09", "access_time": "2017-11-01 02:03:04",
|
"create_time": "1990-07-30 07:08:09", "access_time": "2017-11-01 02:03:04",
|
||||||
|
"meta": []interface{}{"text", "text", "place", "place", "label", "label", "friend", "friend", "username", "username"},
|
||||||
|
"view": map[string]interface{}{
|
||||||
|
"list": map[string]interface{}{"name": "left", "create_date": "right"},
|
||||||
|
"edit": map[string]interface{}{"model": "hidden", "username": "hidden"},
|
||||||
|
},
|
||||||
|
"bind": map[string]interface{}{},
|
||||||
"type": "model", "name": "shy", "data": "", "ship": map[string]interface{}{
|
"type": "model", "name": "shy", "data": "", "ship": map[string]interface{}{
|
||||||
"prev": map[string]interface{}{"type": "model", "data": ""},
|
"prev": map[string]interface{}{"type": "model", "data": ""},
|
||||||
},
|
},
|
||||||
@ -548,7 +554,7 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
|
|
||||||
fields := kit.View(arg[3:], m.Confm("note_view"))
|
fields := kit.View(arg[3:], m.Confm("note_view"))
|
||||||
|
|
||||||
hv, _ := kit.Hash("type", "value", "name", arg[1], "data", kit.Select(m.Option(arg[1]), arg, 2))
|
hv, _ := kit.Hash("type", "value", "name", arg[1], "data", kit.Select(arg[2], m.Option(arg[2])))
|
||||||
hn := m.Conf("note", []string{hv, "ship", "note", "data"})
|
hn := m.Conf("note", []string{hv, "ship", "note", "data"})
|
||||||
if arg[1] == "model" {
|
if arg[1] == "model" {
|
||||||
hm, _ := kit.Hash("type", "model", "name", arg[2])
|
hm, _ := kit.Hash("type", "model", "name", arg[2])
|
||||||
@ -560,6 +566,14 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
hvs := kit.Trans(note["data"])
|
hvs := kit.Trans(note["data"])
|
||||||
hm := kit.Format(kit.Chain(note, "ship.model.data"))
|
hm := kit.Format(kit.Chain(note, "ship.model.data"))
|
||||||
|
|
||||||
|
value := []interface{}{}
|
||||||
|
values := map[string]interface{}{}
|
||||||
|
m.Confm("note", []string{hm, "data"}, func(i int, model map[string]interface{}) {
|
||||||
|
v := m.Conf("note", []string{hvs[i], "data"})
|
||||||
|
value = append(value, map[string]interface{}{"type": model["type"], "name": model["name"], "value": v})
|
||||||
|
values[kit.Format(model["name"])] = v
|
||||||
|
})
|
||||||
|
|
||||||
for i := 0; i < len(fields); i++ {
|
for i := 0; i < len(fields); i++ {
|
||||||
switch fields[i] {
|
switch fields[i] {
|
||||||
case "key":
|
case "key":
|
||||||
@ -571,16 +585,11 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
case "view":
|
case "view":
|
||||||
m.Add("append", "view", kit.Format(m.Conf("note", []string{hm, "view"})))
|
m.Add("append", "view", kit.Format(m.Conf("note", []string{hm, "view"})))
|
||||||
case "value":
|
case "value":
|
||||||
value := []interface{}{}
|
|
||||||
m.Confm("note", []string{hm, "data"}, func(i int, model map[string]interface{}) {
|
|
||||||
value = append(value, map[string]interface{}{
|
|
||||||
"type": model["type"], "name": model["name"],
|
|
||||||
"value": m.Conf("note", []string{hvs[i], "data"}),
|
|
||||||
})
|
|
||||||
})
|
|
||||||
m.Add("append", "value", kit.Format(value))
|
m.Add("append", "value", kit.Format(value))
|
||||||
case "data", "ship":
|
case "data", "ship":
|
||||||
m.Add("append", fields[i], kit.Format(note[fields[i]]))
|
m.Add("append", fields[i], kit.Format(note[fields[i]]))
|
||||||
|
default:
|
||||||
|
m.Add("append", fields[i], kit.Format(values[fields[i]]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -593,6 +602,8 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
m.CopyFuck(m.Cmd("mdb.config", "note", hm), "append").Set("result").Table()
|
m.CopyFuck(m.Cmd("mdb.config", "note", hm), "append").Set("result").Table()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 模板视图
|
||||||
if arg[2] == "view" {
|
if arg[2] == "view" {
|
||||||
for i := 4; i < len(arg)-1; i += 2 {
|
for i := 4; i < len(arg)-1; i += 2 {
|
||||||
m.Conf("note", []string{hm, "view", arg[3], arg[i]}, arg[i+1])
|
m.Conf("note", []string{hm, "view", arg[3], arg[i]}, arg[i+1])
|
||||||
@ -603,10 +614,20 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
// 操作模板
|
// 操作模板
|
||||||
data := []interface{}{}
|
data := []interface{}{}
|
||||||
if model := m.Confm("note", hm); model == nil { // 添加模板
|
if model := m.Confm("note", hm); model == nil { // 添加模板
|
||||||
|
view := map[string]interface{}{}
|
||||||
|
m.Confm("note", "81c5709d091eb04bd31ee751c3f81023.view", func(key string, fields map[string]interface{}) {
|
||||||
|
vs := map[string]interface{}{}
|
||||||
|
for k, v := range fields {
|
||||||
|
vs[k] = v
|
||||||
|
}
|
||||||
|
view[key] = vs
|
||||||
|
})
|
||||||
|
|
||||||
prev := m.Conf("note", []string{"81c5709d091eb04bd31ee751c3f81023", "ship", "prev", "data"})
|
prev := m.Conf("note", []string{"81c5709d091eb04bd31ee751c3f81023", "ship", "prev", "data"})
|
||||||
m.Confv("note", hm, map[string]interface{}{
|
m.Confv("note", hm, map[string]interface{}{
|
||||||
|
"type": "model", "name": arg[1], "data": data, "view": view,
|
||||||
"create_time": m.Time(), "access_time": m.Time(),
|
"create_time": m.Time(), "access_time": m.Time(),
|
||||||
"type": "model", "name": arg[1], "data": data, "ship": map[string]interface{}{
|
"ship": map[string]interface{}{
|
||||||
"prev": map[string]interface{}{"type": "model", "data": prev},
|
"prev": map[string]interface{}{"type": "model", "data": prev},
|
||||||
"note": map[string]interface{}{"type": "note", "data": ""},
|
"note": map[string]interface{}{"type": "note", "data": ""},
|
||||||
},
|
},
|
||||||
@ -617,7 +638,9 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
m.Confv("note", []string{hm, "access_time"}, m.Time())
|
m.Confv("note", []string{hm, "access_time"}, m.Time())
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(data) == 0 { // 操作元素
|
// 操作元素
|
||||||
|
if len(data) == 0 {
|
||||||
|
arg = append(arg, kit.Trans(m.Confv("note", "81c5709d091eb04bd31ee751c3f81023.meta"))...)
|
||||||
for i := 2; i < len(arg)-1; i += 2 {
|
for i := 2; i < len(arg)-1; i += 2 {
|
||||||
data = append(data, map[string]interface{}{"name": arg[i], "type": arg[i+1]})
|
data = append(data, map[string]interface{}{"name": arg[i], "type": arg[i+1]})
|
||||||
|
|
||||||
|
@ -201,6 +201,9 @@ var Index = &ctx.Context{Name: "chat", Help: "会议中心",
|
|||||||
if m.Option("username") == "o978M0XIrcmco28CU1UbPgNxIL78" {
|
if m.Option("username") == "o978M0XIrcmco28CU1UbPgNxIL78" {
|
||||||
m.Option("username", "shy")
|
m.Option("username", "shy")
|
||||||
}
|
}
|
||||||
|
if m.Option("username") == "o978M0ff_Y76hFu1FPLif6hFfmsM" {
|
||||||
|
m.Option("username", "shy")
|
||||||
|
}
|
||||||
|
|
||||||
// 创建空间
|
// 创建空间
|
||||||
if !m.Options("bench") && m.Option("bench", m.Cmd("aaa.sess", m.Option("sessid"), "bench").Append("key")) == "" {
|
if !m.Options("bench") && m.Option("bench", m.Cmd("aaa.sess", m.Option("sessid"), "bench").Append("key")) == "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user