我正在嘗試安裝著色器插件的一個分支。它的要求最低,awk 就是其中之一。但我似乎遇到了一堆錯誤。
line 31:
E492: Not an editor command: const s:RXFLT = '%(\d*\.)?\d '
line 34:
E492: Not an editor command: const s:RXPCT = '%(\d*\.)?\d \%'
line 37:
E492: Not an editor command: const s:RXPCTORFLT = '%(\d*\.)?\d \%?'
line 40:
E492: Not an editor command: const s:CMMA = '\s*,\s*'
line 554:
E492: Not an editor command: const s:CLRZR_AWK_SCRIPT_PATH = expand('<sfile>:p:h') . '/clrzr.awk'
Error detected while processing function clrzr#Enable:
line 22:
E121: Undefined variable: s:CLRZR_AWK_SCRIPT_PATH
E116: Invalid arguments for function job_start( ['awk', '-f', s:CLRZR_AWK_SCRIPT_PATH], job_opts)
line 27:
E121: Undefined variable: s:awk_job
E116: Invalid arguments for function job_getchannel(s:awk_job)
line 28:
E121: Undefined variable: s:awk_chan
E116: Invalid arguments for function string(s:awk_chan) == 'channel fail'
line 86:
E216: No such group or event: SafeState * call s:SafeStateUpdate()
該插件可以在這里訪問: https ://github.com/BourgeoisBear/clrzr
此外,我附上了錯誤的原始檔案: https ://raw.githubusercontent.com/BourgeoisBear/clrzr/master/autoload/clrzr.vim
uj5u.com熱心網友回復:
:help :const在補丁 8.1.1539 中引入。如果您的 Vim 無法識別它,則意味著它對于該插件來說太舊了。
你可以……
- 使用原版插件,貌似沒有使用太多新功能,
- 或制作您自己的該叉子的向后兼容叉子,
- 或將 Vim 升級到更新的版本。
我會選擇第三種選擇。
此外,您可能想要求該分支的作者清楚地說明插件的要求。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/473103.html
