如何在通过调用 make 打开 quickfix windows 后调用函数
How to call a function after quickfix windows was opened by calling make
我正在编写一个与 meson 一起使用的小插件:我使用 makeprg
变量来设置命令,因此我可以从 quickfix window 中受益。设置变量后调用 make,然后调用另一个本地函数:
function s:LinkCompilationDatabase()
...
endfunction
function s:MesonSetup() abort
let &makeprg = 'meson setup builddir'
silent make|redraw!
s:LinkCompilationDatabase()
endfunction
失败并出现此错误:
Error detected while processing function <SNR>22_MesonSetup:
line xx:
E21: Cannot make changes, 'modifiable' is off
make步骤出错与否无所谓
如何在 make
之后调用函数?
使用:call
调用函数,:let
存储函数result/an表达式。
我正在编写一个与 meson 一起使用的小插件:我使用 makeprg
变量来设置命令,因此我可以从 quickfix window 中受益。设置变量后调用 make,然后调用另一个本地函数:
function s:LinkCompilationDatabase()
...
endfunction
function s:MesonSetup() abort
let &makeprg = 'meson setup builddir'
silent make|redraw!
s:LinkCompilationDatabase()
endfunction
失败并出现此错误:
Error detected while processing function <SNR>22_MesonSetup:
line xx:
E21: Cannot make changes, 'modifiable' is off
make步骤出错与否无所谓
如何在 make
之后调用函数?
使用:call
调用函数,:let
存储函数result/an表达式。