Skip to content

Commit f7d2207

Browse files
committed
Optimized jsGlobalObjects
We had some special matching for Intl and certain submethods. It seems needless to do this for the following reasons: * The look behind added massive overhead (especially since the rule was not contained) * We never do any special matching for any other global objects, so why these?
1 parent 01ecaf9 commit f7d2207

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

syntax/javascript.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ syntax keyword jsKeyword yield
124124
syntax keyword jsException try catch throw finally
125125
syntax keyword jsAsyncKeyword async await
126126

127-
syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object Symbol Map WeakMap Set RegExp String Proxy Promise Buffer ParallelArray ArrayBuffer DataView Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Intl JSON Math console document window
128-
syntax match jsGlobalObjects /\%(Intl\.\)\@<=\(Collator\|DateTimeFormat\|NumberFormat\)/
127+
syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object Symbol Map WeakMap Set RegExp String Proxy Promise Buffer ParallelArray ArrayBuffer DataView Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray JSON Math console document window Intl Collator DateTimeFormat NumberFormat
129128

130129
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
131130

0 commit comments

Comments
 (0)