1

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?

doraemon
  • 1,667
  • 11
  • 27

1 Answers1

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?.

Martin Tournoij
  • 62,054
  • 25
  • 192
  • 271