mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
add shy.vim
Change-Id: I17e38f49afdf64a08d8d29ffb6573ee2de40e429
This commit is contained in:
parent
e9a5e079f0
commit
63f84a3dd6
@ -174,6 +174,6 @@ function! BenchCode(cmd, arg)
|
||||
exe "silent !bench " l:line
|
||||
endfunction
|
||||
|
||||
autocmd BufReadPost * call BenchCode("counter", ["nopen", 1])
|
||||
autocmd BufWritePost * call BenchCode("counter", ["nsave", 1])
|
||||
" autocmd BufReadPost * call BenchCode("counter", ["nopen", 1])
|
||||
" autocmd BufWritePost * call BenchCode("counter", ["nsave", 1])
|
||||
"}}}
|
||||
|
@ -106,7 +106,7 @@ bindkey "^P" up-line-or-beginning-search
|
||||
bindkey -M vicmd j down-line-or-beginning-search
|
||||
bindkey -M vicmd k up-line-or-beginning-search
|
||||
|
||||
preexec() {
|
||||
bench web.code.counter nexec 1 >/dev/null
|
||||
}
|
||||
|
||||
# preexec() {
|
||||
# # bench web.code.counter nexec 1 >/dev/null
|
||||
# }
|
||||
#
|
||||
|
@ -1,71 +1,77 @@
|
||||
syn match shComment "#.*$"
|
||||
syn match shString "'[^']*'"
|
||||
syn match shString "\"[^\"]*\""
|
||||
syn match shNumber "-\=\<\d\+\>#\="
|
||||
syntax match shyComment "#.*$"
|
||||
syntax match shyContext "^\~[a-zA-Z0-9_\.]\+\>"
|
||||
syntax match shyCommand "\(^\|\t\| \|$(\)[a-zA-Z0-9_\.]\+\>"
|
||||
syntax match shyConfig "\(^\|\t\| \|$(\)config\>"
|
||||
syntax match shyCache "\(^\|\t\| \|$(\)cache\>"
|
||||
|
||||
syn match shOperator "=\|+\|-\|*\|/"
|
||||
syn match shOperator "<\|<=\|>\|>=\|!=\|=="
|
||||
syn match shOperator "\\"
|
||||
syn match shOperator "\~[-_a-zA-Z0-9\.]\+\>"
|
||||
syn match shShellVariables "\$[-_a-zA-Z0-9]\+\>"
|
||||
syn match shShellVariables "@[-_a-zA-Z0-9]\+\>"
|
||||
syntax match shyString "'[^']*'"
|
||||
syntax match shyString "\"[^\"]*\""
|
||||
syntax match shyNumber "-\=\<\d\+\>#\="
|
||||
syntax match shVariable "\$[_a-zA-Z0-9]\+\>"
|
||||
syntax match shVariable "@[_a-zA-Z0-9]\+\>"
|
||||
|
||||
" syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly shift trap ulimit umask wait
|
||||
syn match shySubCommand "\<\(load\|save\)\>"
|
||||
" context nfs
|
||||
syn match shySubCommand "\<\(import\|export\)\>"
|
||||
" context mdb
|
||||
syn match shyArgument "\<\(dbname\|dbhelp\)\>"
|
||||
" context aaa
|
||||
syn match shyArgument "\<\(componet\|command\)\>"
|
||||
" context web
|
||||
syn match shyArgument "\<\(client\|cookie\|header\)\>"
|
||||
syn match shyOperator "\<\(new\)\>"
|
||||
|
||||
" syn keyword shStatement if else elif end for
|
||||
highlight shyComment ctermfg=blue
|
||||
highlight shyContext ctermfg=red
|
||||
highlight shyCommand ctermfg=green
|
||||
highlight shyConfig ctermfg=yellow
|
||||
highlight shyCache ctermfg=yellow
|
||||
|
||||
" ctx command
|
||||
syn match shStatement "\(^\|\t\| \|$(\)cache"
|
||||
syn match shStatement "\(^\|\t\| \|$(\)config"
|
||||
" ctx command
|
||||
syn match shCommand "\(^\|\t\| \|$(\)command"
|
||||
" cli command
|
||||
syn match shStatement "\(^\|\t\| \|$(\)let"
|
||||
syn match shStatement "\(^\|\t\| \|$(\)var"
|
||||
syn match shStatement "\(^\|\t\| \|$(\)return"
|
||||
syn match shStatement "\(^\|\t\| \|$(\)arguments"
|
||||
syn match shStatement "\(^\|\t\| \|$(\)source"
|
||||
syn match shCommand "\(^\|\t\| \|$(\)alias"
|
||||
|
||||
" aaa command
|
||||
syn match shCommand "\(^\|\t\| \|$(\)hash"
|
||||
syn match shCommand "\(^\|\t\| \|$(\)auth"
|
||||
syn match shOperator "\<\(data\|ship\|role\)\>"
|
||||
syn match shSubCommand "\<\(username\|userrole\|componet\|command\)\>"
|
||||
|
||||
" web command
|
||||
syn match shCommand "\(^\|\t\| \|$(\)serve"
|
||||
syn match shCommand "\(^\|\t\| \|$(\)route"
|
||||
syn match shCommand "\(^\|\t\| \|$(\)client"
|
||||
syn match shCommand "\(^\|\t\| \|$(\)cookie"
|
||||
syn match shCommand "\(^\|\t\| \|$(\)template"
|
||||
|
||||
" mdb command
|
||||
syn match shCommand "\(^\|\t\| \|$(\)open"
|
||||
highlight shyString ctermfg=magenta
|
||||
highlight shyNumber ctermfg=magenta
|
||||
highlight shyVariable ctermfg=magenta
|
||||
highlight shyOperator ctermfg=yellow
|
||||
highlight shyArgument ctermfg=cyan
|
||||
highlight shySubCommand ctermfg=yellow
|
||||
|
||||
|
||||
hi def link shComment Comment
|
||||
hi def link shString String
|
||||
hi def link shNumber Number
|
||||
hi def link shOperator Operator
|
||||
hi def link shShellVariables PreProc
|
||||
hi def link shStatement Statement
|
||||
hi def link shCommand Identifier
|
||||
hi def link shSubCommand String
|
||||
|
||||
hi def link shArithmetic Special
|
||||
hi def link shCharClass Identifier
|
||||
hi def link shSnglCase Statement
|
||||
hi def link shCommandSub Special
|
||||
hi def link shConditional Conditional
|
||||
hi def link shCtrlSeq Special
|
||||
hi def link shExprRegion Delimiter
|
||||
hi def link shFunctionKey Function
|
||||
hi def link shFunctionName Function
|
||||
hi def link shRepeat Repeat
|
||||
hi def link shSet Statement
|
||||
hi def link shSetList Identifier
|
||||
hi def link shSpecial Special
|
||||
hi def link shTodo Todo
|
||||
hi def link shAlias Identifier
|
||||
|
||||
" syn match shNumber "-\=\<\d\+\>#\="
|
||||
"
|
||||
" syn match shOperator "=\|+\|-\|*\|/"
|
||||
" syn match shOperator "<\|<=\|>\|>=\|!=\|=="
|
||||
" syn match shOperator "\\"
|
||||
"
|
||||
" " syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly shift trap ulimit umask wait
|
||||
"
|
||||
" " syn keyword shStatement if else elif end for
|
||||
"
|
||||
" " ctx command
|
||||
"
|
||||
" " ctx command
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)command"
|
||||
" " cli command
|
||||
" syn match shStatement "\(^\|\t\| \|$(\)let"
|
||||
" syn match shStatement "\(^\|\t\| \|$(\)var"
|
||||
" syn match shStatement "\(^\|\t\| \|$(\)return"
|
||||
" syn match shStatement "\(^\|\t\| \|$(\)arguments"
|
||||
" syn match shStatement "\(^\|\t\| \|$(\)source"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)alias"
|
||||
"
|
||||
" " aaa command
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)hash"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)auth"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)role"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)user"
|
||||
" syn match shSubCommand "\<\(componet\|command\)\>"
|
||||
"
|
||||
" " web command
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)serve"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)route"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)client"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)cookie"
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)template"
|
||||
"
|
||||
" " mdb command
|
||||
" syn match shCommand "\(^\|\t\| \|$(\)open"
|
||||
"
|
||||
"
|
||||
|
Loading…
x
Reference in New Issue
Block a user