2

I would like to create a vim syntax file where either:

  1. White space is included in keywords.
  2. White space is ignored in keywords.

Either would work for my purpose, which is to create a JMP scripting language (JSL) syntax file. In JMP, whitespace is ignored in keywords, so New Column("Col1") and NewColumn(Col1`) are identical. The former format, with the space, is the standard.

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
Caleb
  • 3,839
  • 7
  • 26
  • 35

1 Answers1

4

You can syntax match with a regular expression to include optional whitespace:

:syntax match GROUPNAME /\<New\s*Column\>/

Note, that this is not quite the same as syntax keyword, because keyword has higher priority. In practice, it rarely matters.

Mud
  • 28,277
  • 11
  • 59
  • 92