1 Star 4 Fork 0

晨璇/cppjson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.config.vim 2.05 KB
一键复制 编辑 原始数据 按行查看 历史
晨璇 提交于 2024-11-02 16:39 . refactor: greater json
" this config is for project
" name : the task name
" mode : (new version add)the mode of task,quickfix,term,workflow,shell
" workflow first exec task [begin],and if first exec is ok,exec task [end]
" use workflow mode,first exec must be quickfix
" workflow mode option is only with:begin,next,name,key
" shell model only run in backgroud and show nothing which is always success
" command : the command to run
" path : path can be termtask#Term_get_dir() stand for git,expand("%:p:h") for current dir
" expand("%") for current buffer all path,expand("%:t") for current buffer name
" use . can connect str
" close : term and quickfix after command status
" 0 noclose
" 1 close
" 2 if command is not ok,will stay open,or close,
" 3 do not open first,after finish,open it,
" type : pos of task tab or vsplit or split
" key : key can bound map to make task run
" script : pre,end script is vimscript,use | to divide
" can define function,and make end_script call func to do it(recommand way)
" can use g:asyncrun_code==0 to judge task if success
let s:root=termtask#Term_get_dir()
let s:pwd=expand('%:p:h')
let g:Term_project_task=[
\{
\'name' : 'build',
\'command' : 'make',
\'mode' : 'quickfix',
\'path' : s:root.'/test',
\'close' : 2,
\'type' : 'split',
\'key' : '\1',
\'pre_script' : '',
\'end_script' : '',
\},
\{
\'name' : 'run',
\'command' : './main',
\'mode' : 'term',
\'path' : s:root.'/test',
\'close' : 0,
\'type' : 'vsplit',
\'key' : '\2',
\},
\{
\'name' : 'workflow',
\'mode' : 'workflow',
\'begin' : 'build',
\'next' : 'run',
\'key' : '\3',
\},
\{
\'name' : 'test',
\'command' : 'make;./main',
\'mode' : 'term',
\'path' : s:root."/test",
\'close' : 0,
\'type' : 'vsplit',
\},
\]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenxuan520/cppjson.git
git@gitee.com:chenxuan520/cppjson.git
chenxuan520
cppjson
cppjson
master

搜索帮助