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.
LOAD, FROM, WHERE, GROUP BY, ORDER BY, INNER JOIN, LEFT JOIN, etc.
Date#, Sum, Count, If, Match, ApplyMap, Peek, Previous, etc.
=, <>, >=, <=, AND, OR, NOT, &, +, -, *, /, etc.
Single and double-quoted strings with escape sequences
Integers, decimals, scientific notation, currency
Date literals, time stamps, and date functions
$(variable), SET statements, LET statements
Column references, calculated fields, aliases
Table references, file paths, connection strings
Single-line (//) and multi-line (/* */) comments
REM blocks for documentation and notes
TRACE, DEBUG, VERBATIM, and other directives
// 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();
✅ 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