Syntax highlighting for Notepad++

Description:
Notepad++ scripts for install or adding support for RouterOS Syntax highlighting.

Features:
Compressed file contain two method how change add support.
Autoinstall (for simple users): install and configuring and associate extension .rsc
Manual (for advanced users): Must configuration files import manually only

Download:

 
https://drive.google.com/drive/folders/1702Cb_Dkby7J-GBoisCrbUztaQmyjU-t

…and as attachment:
v1.7.7z (176 KB)
Bug tracking system:

 
http://www.lukaskysela.cf/bugs/add-ID4355704f582b715954796774337a394a54462b5041513d3d

Changelog:

 
v1.7 (2019-06-15):
	* updated Notepad++ version to 7.7
	* disabled autocompletion text
	* fixed UAC for bat script (associating file extensions)

v1.6 (2019-01-15):
	* fixed an error a Associating File Extensions on x86 system

v1.5 (2019-01-08):
	* fixed an error a transparent text background
	+ adding method (2b) for manual import highlight themes (Readme.txt)

v1.4 (2019-01-07):
	* Disabled auto Detect Encoding for open files
	* Update Notepad++ to 7.6.2

v1.3 (2018-12-07):
	* Associating File Extensions methodology changed

v1.2 (2018-11-16):
	+ two new syntax highlight themes (Black Glow, Light Glow)

v1.1 (2018-11-15):
	* update MikroTik database commands
	+ automatic download of the Notepad++

v1.0 (2018-11-14):
	+ automatic 3-layer installation
	+ manual import

Syntax themes:
Black, Black Glow, Light and Light Glow

Black:
Syntax Preview - Light Glow.png
Black Glow:
Syntax Preview - Light.png
Light:
Syntax Preview - Black Glow.png
Light Glow:
Syntax Preview - Black.png

Thanks for sharing. Here is what I’ve been using too. I don’t remember where I got it. I’ve updated it here and there. To use, create a “userDefineLang.xml” file and place it in the %AppData%\Notepad++ directory. Copy the contents below into that file and save it.


00# 01 02EOL 03 04 ! " $ ( ) , : [ ] { | } = address-list-timeout allow-fast-path update-time connection-nat-state frequency-mode channel-width to-ports time-zone-autodetect default-screen backlight-timeout strong-crypto client-id add-arp wps-mode tx-power-mode tx-power tcp-syncookies send-redirects secure-redirects rp-filter master-port default-name ac-name accessible-via-web account-local-traffic accounting action active-flow-timeout active-mode add-default-route address-list address-pool address addresses-per-mac admin-mac advertise-dns advertise-mac-address ageing-time allocate-udp-ports-from allow-disable-external-interface allow-guests allow-remote-requests allow allowed-number always-from-cache area-id area arp as audio-max audio-min audio-monitor auth-algorithms auth-method auth authenticate authentication-password authentication-protocol authentication-types authentication authoritative auto-mac auto-negotiation auto-send-supout automatic-supout autonomous backup-allowed baud-rate bidirectional-timeout blank-interval bootp-support bridge-mode bridge broadcast-addresses broadcast bsd-syslog cable-settings cache-administrator cache-entries cache-hit-dscp cache-max-ttl cache-on-disk cache-size certificate chain change-tcp-mss channel-time channel check-interval cipher client-to-client-reflection comment connection-bytes connection-rate connection-idle-timeout connection-mark connection-state tcp-flags packet-size contact contrast cpu data-bits default-ap-tx-limit default-authentication default-client-tx-limit default-forwarding default-group default-profile default-route-distance dh-group dhcp-option dial-on-demand directory disable-running-check disabled disk-file-count disk-file-name disk-lines-per-file disk-stop-on-full display-time distance distribute-default distribute-for-default-route dns-name dns-server domain dpd-interval dpd-maximum-failures dst-address-list dst-address dst-delta dst-end dst-port dst-start dynamic-label-range e eap-methods enabled enc-algorithm enc-algorithms encryption-password encryption-protocol engine-id exchange-mode exclude-groups file-limit file-name filter-ip-address filter-ip-protocol filter-mac-address filter-mac-protocol filter-mac filter-port filter-stream flow-control forward-delay frame-size frames-per-second from full-duplex garbage-timer gateway-class gateway-keepalive gateway-selection gateway generate-policy generic-timeout group-ciphers group-key-update hash-algorithm hide-ssid hop-limit hotspot-address html-directory http-cookie-lifetime http-proxy i icmp-timeout idle-timeout ignore-as-path-len in-filter in-interface inactive-flow-timeout instance interface interfaces interim-update interval ipsec-protocols jump-target keep-max-sms keepalive-timeout kind l2mtu latency-distribution-scale lease-time level lifebytes lifetime line-count list local-address location log-prefix login-by login loop-detect lsr-id mac-address managed-address-configuration management-protection-key management-protection manycast max-cache-size max-client-connections max-connections max-fresh-time max-message-age max-mru max-mtu max-server-connections max-sessions max-station-count max-udp-packet-size memory-limit memory-lines memory-scroll memory-stop-on-full metric-bgp metric-connected metric-default metric-ospf metric-other-ospf metric-rip metric-static min-rx mode mpls-mtu mq-pfifo-limit mrru mtu multi-cpu multicast multiple-channels multiplier my-id-user-fqdn name nat-traversal netmask network new-connection-mark new-packet-mark new-routing-mark no-ping-delay note ntp-server on-backup on-master only-headers only-one origination-interval other-configuration out-filter out-interface page-refresh parent-proxy-port parent-proxy parent parity passthrough password path-vector-limit paypal-accept-pending paypal-allowed paypal-secure-response permissions pfifo-limit pfs-group policy port ports preemption-mode preferred-gateway preferred-lifetime prefix primary-ntp primary-server priority profile propagate-ttl proposal-check proposal proprietary-extensions protocol-mode vlan-filtering vlan-ids tagged protocol query-interval query-response-interval queue quick-leave ra-delay ra-interval ra-lifetime radius-eap-accounting radius-mac-accounting radius-mac-authentication radius-mac-caching radius-mac-format radius-mac-mode ranges rate-limit reachable-time read-access read-only receive-all receive-enabled receive-errors red-avg-packet red-burst red-limit red-max-threshold red-min-threshold redistribute-bgp redistribute-connected redistribute-ospf redistribute-other-bgp redistribute-other-ospf redistribute-rip redistribute-static remember remote-address remote-ipv6-prefix-pool remote-port remote require-client-certificate retransmit-interval router-id routing-mark routing-table sa-dst-address sa-src-address scope secondary-ntp secondary-server secret security-profile security send-initial-contact serialize-connections servers service-name set-system-time sfq-allot sfq-perturb shared-users show-at-login show-dummy-rule signup-allowed sip-direct-media skin smtp-server source speed split-user-domain src-address-list src-address src-port ssid-all ssid state-after-reboot static-algo-0 static-algo-1 static-algo-2 static-algo-3 static-key-0 static-key-1 static-key-2 static-key-3 static-sta-private-algo static-sta-private-key static-transmit-key status-autorefresh stop-bits store-every store-leases-disk streaming-enabled streaming-max-rate streaming-server supplicant-identity switch-to-spt-bytes switch-to-spt-interval switch-to-spt syslog-facility syslog-severity target-scope target tcp-close-timeout tcp-close-wait-timeout tcp-established-timeout tcp-fin-wait-timeout tcp-last-ack-timeout tcp-syn-received-timeout tcp-syn-sent-timeout tcp-syncookie tcp-time-wait-timeout term test-id threshold time-zone-name time-zone timeout-timer timeout tls-certificate tls-mode to-addresses topics transmit-hold-count transparent-proxy transport-address trap-generators trap-target trap-version ttl tunnel type udp-stream-timeout udp-timeout unicast-ciphers update-stats-interval update-timer use-compression use-encryption use-explicit-null use-ip-firewall-for-pppoe use-ip-firewall-for-vlan use-ip-firewall use-ipv6 use-mpls use-peer-dns use-peer-ntp use-radius use-service-tag use-vj-compression user v3-protocol valid-lifetime vcno verify-client-certificate version vlan-id vrid watch-address watchdog-timer wds-cost-range wds-default-bridge wds-default-cost wds-ignore-ssid wds-mode wins-server wmm-support wpa-pre-shared-key wpa2-pre-shared-key write-access burst-limit burst-threshold burst-time limit-at priority max-limit packet-mark value option target-addresses encryption-password always-broadcast connect-to adaptive-noise-immunity compression band country frequency hw-retries rate-selection scan-list server set add delay do error execute find for foreach global if len local nothing parse pick put resolve set time toarray tobool toid toip toip6 tonum tostr totime typeof while beep export import led password ping quit redo setup undo print detail file log info get warning critical / /interface /system /ip /tool /queue /ipv6 /lcd accounting address address-list align area bandwidth-server bfd bgp bridge client clock cloud community config connection console customer dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface0 ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles service service-port settings shares smb sms sniffer ssh snmp snooper socks sstp-server system tool tracking traffic-flow traffic-generator tree type upgrade upnp user user-manager users vlan vrrp watchdog web-access wireless pppoe lan wan layer7-protocol eth- wlan- bridge- \n \r\ \ 00" 01 02"

New v1.3 (2018-12-07):

  • Associating File Extensions methodology changed

Thanks for the contribution.

Please edit your fist post and add the file to it, not just the link. Click Attachments below edit window to add you file.

Also you should be more clear in what to import or run for auto-install.
Form auto or manual folder?
What of the two files in folder?
v1.3\MikroTik Scripts Syntax Highlighter for Notepad++ v1.3\Auto - Preconfigured\Notepad++\Data\Settings-Black\Notepad++

You should also mention that if you use the back theme, you need to change style on your Notepad++ to black style or else it does not look good.

File to download:
.
v1.3.7z (176 KB)

New v1.4 (2019-01-07):

  • Disabled auto Detect Encoding for open files
  • Updated Notepad++ to version 7.6.2

Files are provided free of charge in my time and are designed for advanced users. There is no GUI. If you want to change the description, please include some suggestion in a private message or here, and if it is good idea, then I"ll add it to the next version.

Is it possible to make an edition with the MikroTik CLI colors? You can SSH to the device and see what they use.
Also please use transparent backgrounds for the text, because it doesn’t look as good in other Notepad++ themes, like Obsidian.

@MT

Can you move this thread to this folder?
https://forum.mikrotik.com/viewforum.php?f=23
(Make a ghost link back here)

Here are some indicative values from my iteration (Dark theme - Obsidian):

  • Default text: fgColor=“BBBBBB” bgColor=“000000” colorStyle=“1”
  • Comments: fgColor=“558855” bgColor=“000000” colorStyle=“1”
  • Line comments: fgColor=“38B86B” bgColor=“000000” colorStyle=“1”
  • Numbers: fgColor=“BBBBBB” bgColor=“000000” colorStyle=“1”
  • Value names: fgColor=“55FF55” bgColor=“000000” colorStyle=“1”
  • Parameters: fgColor=“BB00BB” bgColor=“000000” colorStyle=“1”
  • Directories/Paths: fgColor=“00BBBB” bgColor=“000000” colorStyle=“1”
  • Escape sequences: fgColor=“5555FF” bgColor=“000000” colorStyle=“1”
  • Operators: fgColor=“BBBB00” bgColor=“000000” colorStyle=“1”
  • Folder in code: fgColor=“BBBB00” bgColor=“000000” colorStyle=“1”
  • Delimiters: fgColor=“888888” bgColor=“000000” colorStyle=“1”

Basically the only change that needs to be made for light themes would be changing the default text to “000000”.

Yes, I know how to do it and I"ve done it already. At the moment I"m waiting for Mikrotik"s support for the CLI color scheme. I have not found the definition of the color scheme on the internet or here at the forum. SSH (Putty) and other programs take the color scheme directly from the terminal. It is xterm-256color mode only. I would like to add it in the next version. I thought Mikrotik"s support would be answered sooner. I do not want to publish a new version for one change only.

Edit: i recieved reply from MT support.

Hello,

We do not have a documented scheme that I can send you. You should copy the ideas from the RouterOS terminal by hand, it’s the best option right now.

Best regards,
Normunds R.
MikroTik support

Ok i make next version now.
I do not have the original color scheme of the Mikrotik terminal and I no have idea how get it. Maybe from API. But i dont working in API.






New v1.5 (2019-01-08):

  • fixed an error a transparent text background
  • adding method (2b) for manual import highlight themes (Readme.txt)

How? I have standart user rights. Sending PM to other users and moderators i have inactive.

The color values that I’ve already posted here, are the terminal ones (as MT support said).
I did some color picker shenanigans and found the best possible match. Took me a little bit of time overall, but it should be alright.

The true challenge is separating the terminal paths (i.e. /ip address) from actual value names (/ip address set address=…)
This I haven’t been able to pull off in Notepad++ syntax highlighter. Plus there is a metric ton of additional keywords that need to be included, for the sake of completion.

New version: v1.7 (2019-06-15):

  • updated Notepad++ version to 7.7
  • disabled autocompletion text
  • fixed UAC for bat script (associating file extensions)

Thanks for feedback. I accept some of the suggestions. In next versions.

When I open file with .rsc extension then syntax highlighting is used. But after I close Notepad++ and open it again then all is shown as regular text. Choosing syntax from Language menu also doesn’t apply it. Only thing what helps is re-open document.

I have same problem

same problem as well

I was able to get this working by manually importing the language .xml file ( i didnt want to run any of the .bat files as they looked like they installed notepad++ from scratch).

in notepad++ (Version: 7.91 , 32bit) i simply went to language → define your language. Then import (and choose the " light" .xml file from this author/thread , which was located in:

C:\Users\XXXXX\Downloads\MikroTik Scripts Syntax Highlighter for Notepad++ v1.7\Auto - Preconfigured\Notepad++\Data\Settings-Light\Notepad++\userDefineLang.xml

Then (and this seemed to be important), in the same User Define Language window, i choose “Save As…” and gave it my own name. (in my case “rOS Newer”)

now it works great, im able to go to Language → “rOS Newer” and it will highlight beautifully.
(i also have a older notepad++ rOS syntax highlighter i use from ~ 2016 which i have named “rOS Older” - im able to switich between the two at will)

thanks author! beautiful notepad++ add on!

Hello,

the name (the length of name) is the problem.

I’ve shortened it a little bit:
e.g.
Mikrotik Scripts Syntax Highlighter (Black Glow).xml
and inside the xml, too:
<UserLang name=“Mikrotik Scripts Syntax Highlighter (Black Glow) - (.rsc)”

now it works.

Thank you. It’s working good.