5

Is it OK to use spaces for better readability in a .vimrc? For example, right now I have:

set number| "show line numbers
set history=1000

Would it be OK to write instead:

set number | "show line numbers
set history = 1000

I know that if a space is before the virgule in a key remapping then the space becomes part of the mapping, but in the example above the space would not seem to affect the set operation.

muru
  • 24,838
  • 8
  • 82
  • 143
Tyler Durden
  • 2,091
  • 2
  • 23
  • 42

1 Answers1

8

From :help :set-args:

White space between {option} and '=' is allowed and will be ignored. White space between '=' and {value} is not allowed.

So:

set history=1000 " is ok.
set history =1000 " is also ok, but
set history= 1000 " is not. Neighter is
set history = 1000

If the option doesn't take a value you can put as many spaces behind it as you want.

tokoyami
  • 935
  • 6
  • 13