mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
add git.hook
This commit is contained in:
parent
d52c7ce33e
commit
f5ad8da0a5
@ -174,11 +174,10 @@ command! NN call ColorNext()<CR>
|
|||||||
" autocmd BufReadPost * call NCount("~/.nwrite")
|
" autocmd BufReadPost * call NCount("~/.nwrite")
|
||||||
"
|
"
|
||||||
|
|
||||||
let g:bench_code = "http://localhost:9094/code/"
|
function! BenchCode(cmd, arg)
|
||||||
function! BenchCode(path, args)
|
exe "silent !bench web.code." . a:cmd . " " . join(a:arg, " ")
|
||||||
exe "silent !bench web.get " . g:bench_code . a:path . " " . join(a:args, " ")
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
autocmd FileReadPost * call BenchCode("counter", ["name", "nopen", "count", 1])
|
" autocmd BufReadPost * call BenchCode("counter", ["nopen", 1])
|
||||||
autocmd FileWritePost * call BenchCode("counter", ["name", "nsave", "count", 1])
|
autocmd BufWritePost * call BenchCode("counter", ["nsave", 1])
|
||||||
"}}}
|
"}}}
|
||||||
|
@ -106,3 +106,7 @@ bindkey "^P" up-line-or-beginning-search
|
|||||||
bindkey -M vicmd j down-line-or-beginning-search
|
bindkey -M vicmd j down-line-or-beginning-search
|
||||||
bindkey -M vicmd k up-line-or-beginning-search
|
bindkey -M vicmd k up-line-or-beginning-search
|
||||||
|
|
||||||
|
preexec() {
|
||||||
|
bench web.code.counter nexec 1
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,6 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
|
|||||||
"extra_field": 2, "extra_fields": 1, "extra_format": 1, "trans_field": 1, "trans_map": 2},
|
"extra_field": 2, "extra_fields": 1, "extra_format": 1, "trans_field": 1, "trans_map": 2},
|
||||||
Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
if _, ok := m.Target().Server.(*MDB); m.Assert(ok) {
|
if _, ok := m.Target().Server.(*MDB); m.Assert(ok) {
|
||||||
|
|
||||||
table := m.Confx("table", arg, 0)
|
table := m.Confx("table", arg, 0)
|
||||||
if v := m.Confv("tables", table); v != nil {
|
if v := m.Confv("tables", table); v != nil {
|
||||||
table = v.(string)
|
table = v.(string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user