How to load a plugin if the OS is not windows? #596
Answered
by
rodamaral
quantum-booty
asked this question in
Q&A
-
In vim script, !has('win32') checks if its not windows. How can I add this condition when loading a plugin? |
Beta Was this translation helpful? Give feedback.
Answered by
rodamaral
Sep 11, 2021
Replies: 1 comment 1 reply
-
Use the cond field use {
'<repo>',
-- cond = string, function, or list of strings/functions, -- Specifies a conditional test to load this plugin
cond = function()
return vim.fn.has 'win32' ~= 1
end,
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
quantum-booty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use the cond field