Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有一个 vim 插件,它允许使用 vimrc 中的变量进行自定义:
let g:foo_plugin_command="bar"
如何在作为插件代码一部分的 ruby 方法中获取此变量的值?
Vim::evaluate 可用于获取 vim 全局变量值并将其传递给 Ruby
Model.new.run('abc', 123, Vim.evaluate('g:foo_plugin_command'))