Specifically, I’d like to set the makeprg option only if it has not been changed yet. Any way to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can access the contents of an option using
&. So in this case you could check if the option is “empty” like this:— EDIT —
Xavier makes the good point that the default value of
makeprgis not an empty string. You can useset {option}&to set an option to its default, so the following can be used to change the value only if the current value is the default:So calling
call SetMakePrg("my_make")will modify the option only if it is not currently the default.