NetScaler Syntax (ns.conf)
Syntax highlighting and language support for NetScaler / Citrix ADC configurations (ns.conf, CLI batch files) – for VS Code (and VSCodium, Cursor, Windsurf …) and Notepad++.
English · Deutsch ↓ · Blog post: English / Deutsch

Features
- Syntax highlighting for commands, groups and objects (complete list from the official NITRO SDK), parameters, constants, IPv4/IPv6 – and policy expressions inside strings (
HTTP.REQ.HEADER(\"Host\").CONTAINS(…), &&, ||, ALT)
- Outline of all vservers, service groups, servers, monitors, policies, actions, certificates … grouped by type
- Go to definition, find all references and rename for every object name – also from inside expressions (patsets, callouts …)
- Hover help for every command and parameter (from the NITRO SDK); on object names the
add line and the number of references
- Diagnostics for typos, leftovers and weak crypto (see below)
- Snippets for common setups
- Messages, hover texts and settings follow the VS Code display language (English, German)
Keyboard shortcuts
| Function |
Windows / Linux |
macOS |
What it does |
| Outline |
Ctrl+Shift+O |
⌘+⇧+O |
List all objects of the file, type to filter, Enter jumps there |
| Go to definition |
F12 or Ctrl+click |
F12 or ⌘+click |
From a name in a bind line to its add line |
| Find all references |
Shift+F12 |
⇧+F12 |
Where is this policy / service group / certificate used? |
| Rename |
F2 |
F2 |
Change a name everywhere in the file |
| Hover help |
mouse over a word |
mouse over a word |
Description of command / parameter, or definition of an object |
| Problems view |
Ctrl+Shift+M |
⌘+⇧+M |
All diagnostics of the file |
| Comment line |
Ctrl+/ |
⌘+/ |
Adds or removes # |
| Snippet |
type ns-… + Tab |
type ns-… + Tab |
Tab jumps to the next field |
Snippets
| Prefix |
Creates |
ns-lb |
server, service group with monitor and LB vserver |
ns-ssl |
certificate, SSL vserver with SSL profile and certificate binding |
ns-redirect |
responder redirect from HTTP to HTTPS |
ns-rewrite |
rewrite policy inserting a header (e.g. HSTS) |
ns-cs |
content switching by host name |
Diagnostics
| Diagnostic |
Example |
| Object not defined |
bind serviceGroup sg_web srv-tpyo 80 – typo in the server name |
| Object never used (shown faded) |
servers, service groups, monitors, policies, actions, certificates, profiles, LB vservers without IP … |
| Object defined more than once |
add server srv-web01 … twice |
| Weak cipher |
RC4, DES/3DES, MD5, EXPORT, NULL |
| Weak protocol enabled |
-ssl3 ENABLED, -tls1 ENABLED, -tls11 ENABLED |
Undefined and unused objects are only reported in complete configurations (first line #NS…), so batch files for an existing configuration are not full of false positives. This can be changed in the settings.
Settings
| Setting |
Default |
|
netscaler.diagnostics.undefinedObjects |
auto |
Warn when binding to undefined objects (auto = only in complete configurations, always, never) |
netscaler.diagnostics.unusedObjects |
auto |
Show unused objects as faded (auto, always, never) |
netscaler.diagnostics.weakCrypto |
true |
Report weak ciphers and protocols |
Files
Detected automatically: all files whose name ends with ns.conf (ns.conf, sample-ns.conf …), backups such as ns.conf.0, and *.nsconf. For other files click the language in the status bar and choose NetScaler – or set it for a folder that contains only NetScaler configurations (.vscode/settings.json):
"files.associations": { "*.conf": "netscaler", "*.txt": "netscaler" }
Note: Do not use this extension together with another NetScaler extension that registers the language netscaler as well (e.g. "ns.conf"). VS Code then uses the grammar of only one of them.
Installation
- VS Code: search for "NetScaler Syntax" in the Extensions view or use the Visual Studio Marketplace ·
code --install-extension r33net.netscaler-syntax
- VSCodium, Cursor, Windsurf: search in the Extensions view or use Open VSX
- Offline: download the
.vsix from Releases → Extensions → … → Install from VSIX…
- Notepad++: download
NetScaler.xml (light theme) or NetScaler-dark.xml (dark theme) from notepad++/ or the Releases → Language → User Defined Language → Define your language… → Import… → restart Notepad++
Bugs and ideas
A command is missing, something is highlighted wrongly or there is a false positive? Please open an issue – ideally with the affected configuration line (without internal names or IP addresses). How to build, test and release: CONTRIBUTING.md.
Deutsch
Syntax-Highlighting und Sprachunterstützung für NetScaler-/Citrix-ADC-Konfigurationen (ns.conf, CLI-Batchdateien) – für VS Code (und VSCodium, Cursor, Windsurf …) sowie Notepad++. Ausführliche Beschreibung mit Beispielen im Blog: r33net.de – NetScaler in VS Code: Syntax-Highlighting, Gliederung und Fehlerprüfung
Funktionen
- Syntax-Highlighting für Befehle, Bereiche und Objekte (vollständige Liste aus dem offiziellen NITRO SDK), Parameter, Konstanten, IPv4/IPv6 – und Expressions in Strings (
HTTP.REQ.HEADER(\"Host\").CONTAINS(…), &&, ||, ALT)
- Gliederung aller VServer, Service Groups, Server, Monitore, Policies, Actions, Zertifikate … nach Typ
- Gehe zu Definition, alle Verwendungen und Umbenennen für jeden Objektnamen – auch aus Expressions heraus (Patsets, Callouts …)
- Hilfe beim Überfahren zu jedem Befehl und Parameter (aus dem NITRO SDK, englisch); bei Objektnamen die
add-Zeile und die Zahl der Verwendungen
- Hinweise auf Tippfehler, Altlasten und schwache Kryptografie (siehe unten)
- Snippets für häufige Aufgaben
- Meldungen, Hover-Texte und Einstellungen richten sich nach der Anzeigesprache von VS Code (Deutsch, Englisch)
Tastenkürzel
| Funktion |
Windows / Linux |
macOS |
Was passiert |
| Gliederung |
Strg+Shift+O |
⌘+⇧+O |
Alle Objekte der Datei, tippen filtert, Enter springt hin |
| Gehe zu Definition |
F12 oder Strg+Klick |
F12 oder ⌘+Klick |
Vom Namen in einer bind-Zeile zur add-Zeile |
| Alle Verwendungen |
Shift+F12 |
⇧+F12 |
Wo wird diese Policy / Service Group / dieses Zertifikat verwendet? |
| Umbenennen |
F2 |
F2 |
Einen Namen überall in der Datei ändern |
| Hilfe |
Maus über ein Wort |
Maus über ein Wort |
Beschreibung von Befehl / Parameter oder Definition eines Objekts |
| Probleme |
Strg+Shift+M |
⌘+⇧+M |
Alle Hinweise der Datei |
| Zeile auskommentieren |
Strg+# (deutsche Tastatur) |
⌘+/ |
Setzt oder entfernt # |
| Snippet |
ns-… tippen + Tab |
ns-… tippen + Tab |
Tab springt zum nächsten Feld |
Snippets
| Kürzel |
Erzeugt |
ns-lb |
Server, Service Group mit Monitor und LB-VServer |
ns-ssl |
Zertifikat, SSL-VServer mit SSL-Profil und Zertifikatsbindung |
ns-redirect |
Responder-Weiterleitung von HTTP auf HTTPS |
ns-rewrite |
Rewrite-Policy, die einen Header setzt (z. B. HSTS) |
ns-cs |
Content Switching nach Hostname |
Hinweise
| Hinweis |
Beispiel |
| Objekt nicht angelegt |
bind serviceGroup sg_web srv-tpyo 80 – Tippfehler im Servernamen |
| Objekt nirgends verwendet (ausgegraut) |
Server, Service Groups, Monitore, Policies, Actions, Zertifikate, Profile, LB-VServer ohne IP … |
| Objekt doppelt angelegt |
zweimal add server srv-web01 … |
| Schwacher Cipher |
RC4, DES/3DES, MD5, EXPORT, NULL |
| Schwaches Protokoll aktiv |
-ssl3 ENABLED, -tls1 ENABLED, -tls11 ENABLED |
Nicht angelegte und ungenutzte Objekte werden nur in vollständigen Konfigurationen gemeldet (erste Zeile #NS…), damit Batchdateien für eine bestehende Konfiguration nicht voller Fehlalarme sind. Das lässt sich in den Einstellungen ändern.
Einstellungen
| Einstellung |
Standard |
|
netscaler.diagnostics.undefinedObjects |
auto |
Warnung bei Bindung an nicht angelegte Objekte (auto = nur in vollständigen Konfigurationen, always, never) |
netscaler.diagnostics.unusedObjects |
auto |
Ungenutzte Objekte ausgrauen (auto, always, never) |
netscaler.diagnostics.weakCrypto |
true |
Schwache Cipher und Protokolle melden |
Dateien
Automatisch erkannt werden alle Dateien, deren Name auf ns.conf endet (ns.conf, sample-ns.conf …), Backups wie ns.conf.0 sowie *.nsconf. Für andere Dateien unten rechts in der Statusleiste auf die Sprache klicken und NetScaler wählen – oder dauerhaft für einen Ordner, in dem nur NetScaler-Konfigurationen liegen (.vscode/settings.json):
"files.associations": { "*.conf": "netscaler", "*.txt": "netscaler" }
Hinweis: Bitte nicht gleichzeitig mit einer anderen NetScaler-Erweiterung nutzen, die ebenfalls die Sprache netscaler anmeldet (z. B. „ns.conf“). VS Code nimmt dann nur die Farbregeln einer der beiden.
Installation
- VS Code: in den Erweiterungen nach „NetScaler Syntax“ suchen oder Visual Studio Marketplace ·
code --install-extension r33net.netscaler-syntax
- VSCodium, Cursor, Windsurf: in den Erweiterungen suchen oder Open VSX
- Ohne Internet:
.vsix aus den Releases laden → Erweiterungen → … → Install from VSIX…
- Notepad++:
NetScaler.xml (helles Theme) oder NetScaler-dark.xml (dunkles Theme) aus notepad++/ bzw. den Releases laden → Sprachen → Benutzerdefinierte Sprache → Eigene Sprache definieren … → Importieren … → Notepad++ neu starten
Fehler und Wünsche
Fehlt ein Befehl, wird etwas falsch eingefärbt oder gibt es einen Fehlalarm? Bitte ein Issue anlegen – gern auf Deutsch, am besten mit der betroffenen Konfigurationszeile (ohne interne Namen/IPs).
License / Lizenz
MIT © 2015–2026 Rene, r33net.de. The command and parameter descriptions in data/commands.json are taken from the NetScaler NITRO Go SDK (Apache 2.0, © Citrix Systems) – see NOTICE.
| |