Documentation

Syntax Highlighting

Advanced syntax highlighting for Qlik scripts with support for all Qlik functions and constructs.

What's Highlighted

qlik-script-editor provides comprehensive syntax highlighting for all aspects of Qlik scripting language.

Keywords & Functions
Keywords

LOAD, FROM, WHERE, GROUP BY, ORDER BY, INNER JOIN, LEFT JOIN, etc.

Functions

Date#, Sum, Count, If, Match, ApplyMap, Peek, Previous, etc.

Operators

=, <>, >=, <=, AND, OR, NOT, &, +, -, *, /, etc.

Data Types & Literals
Strings

Single and double-quoted strings with escape sequences

Numbers

Integers, decimals, scientific notation, currency

Dates

Date literals, time stamps, and date functions

Variables & Fields
Variables

$(variable), SET statements, LET statements

Field Names

Column references, calculated fields, aliases

Table Names

Table references, file paths, connection strings

Comments & Directives
Comments

Single-line (//) and multi-line (/* */) comments

REM Statements

REM blocks for documentation and notes

Directives

TRACE, DEBUG, VERBATIM, and other directives

Syntax Highlighting in Action
See how different Qlik script elements are highlighted
Example Qlik Script with Syntax Highlighting
// Data loading script with comprehensive highlighting
SET vToday = Today();
SET vStartDate = MakeDate(2023, 1, 1);

/*
 * Load customer master data
 * Source: Excel file with customer information
 */
LOAD 
  CustomerID,
  CustomerName as [Customer Name],
  if(Country = 'USA', 'Domestic', 'International') as CustomerType,
  Date#(RegistrationDate, 'YYYY-MM-DD') as RegDate,
  Num(CustomerID, '00000') as [Customer Code],
  Upper(CustomerName) & ' - ' & Country as DisplayName
FROM [lib://DataFiles/Customers.xlsx]
(ooxml, embedded labels, table is Customers)
WHERE Date#(RegistrationDate, 'YYYY-MM-DD') >= $(vStartDate)
  AND Len(Trim(CustomerName)) > 0;

// Calculate aggregated sales metrics
LEFT JOIN (Customers)
LOAD 
  CustomerID,
  Sum(OrderAmount) as TotalSales,
  Count(DISTINCT OrderID) as OrderCount,
  Avg(OrderAmount) as AvgOrderValue,
  Max(OrderDate) as LastOrderDate,
  Min(OrderDate) as FirstOrderDate,
  RangeSum(Above(Sum(OrderAmount), 0, 12)) as Rolling12MonthSales
FROM [lib://DataFiles/Orders.qvd] (qvd)
GROUP BY CustomerID;

// Create customer tier classification
NoConcatenate
LOAD *,
  Class(TotalSales, 'Premium', 10000, 'Standard', 1000, 'Basic') as CustomerTier,
  if(LastOrderDate >= $(vToday) - 90, 'Active', 'Inactive') as Status
RESIDENT Customers;

DROP TABLE Customers;

TRACE 'Data load completed: ' & Now();
Performance Considerations
Tips for optimal syntax highlighting performance

✅ Best Practices

  • • Use appropriate themes for your environment
  • • Enable only needed highlighting features
  • • Consider disabling animations for large files
  • • Use debounced updates for real-time highlighting

⚠️ Performance Tips

  • • Large files (>10MB) may highlight slowly
  • • Complex regex patterns can impact performance
  • • Consider lazy loading for very large scripts
  • • Use virtualization for extremely long files