Sathish
Sathish

Reputation: 21090

How to get vim config variable value in ruby vim plugin?

There is a vim plugin, which allows customization using a variable in vimrc:

let g:foo_plugin_command="bar"

How can i get the value of this variable in a ruby method that is part of the plugin code?

Upvotes: 0

Views: 244

Answers (1)

Sathish
Sathish

Reputation: 21090

Vim::evaluate can be used to get vim global variable values and pass it to Ruby

Model.new.run('abc', 123, Vim.evaluate('g:foo_plugin_command'))

Upvotes: 1

Related Questions