It seems that & followed by an option name is an variable containing the option value, such as &diff. What is &l:diff. I assume it is the local value for diff option, but I cannot find the doc that mentioned this. (I found the example in fugitive)

In addition, diff is a window-local option and some other options are buffer-local. Do I use the same l: for both of them?

  • 1
    I'm positive I answered this question before, but I can't find the question anywhere :-/ Oct 31, 2017 at 9:18

1 Answer 1


It's the same as setlocal: it changes a setting for just the current buffer or window, instead of locally. See :help :let-& (after you scroll down a bit) and :help :setlocal.

Note: in my experience the easiest way to find stuff in Vim's help pages is to enable the wildmenu setting and press :help :let<Tab> to see which pages exist, and then select the most appropriate one (:let-& in this case). Also see How do I navigate to topics in Vim's documentation?.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.