Community discussions

 
truefriendcz
just joined
Topic Author
Posts: 14
Joined: Mon Jun 05, 2017 11:07 am

Syntax highlighting for Notepad++

Thu Nov 15, 2018 3:27 am

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.6.7z

Bug tracking system:
http://www.lukaskysela.cf/bugs/add-ID4355704f582b715954796774337a394a54462b5041513d3d
Changelog:
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 - Black.png
Black Glow:
Syntax Preview - Black Glow.png
Light:
Syntax Preview - Light.png
Light Glow:
Syntax Preview - Light Glow.png
You do not have the required permissions to view the files attached to this post.
Last edited by truefriendcz on Wed Jan 23, 2019 8:42 am, edited 14 times in total.
 
User avatar
pcunite
Forum Veteran
Forum Veteran
Posts: 907
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: Syntax highlighting for Notepad++

Thu Nov 15, 2018 6:11 am

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.

<NotepadPlus>
<UserLang name="RouterOS" ext="rsc" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02EOL 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">! &quot; $ ( ) , : [ ] { | } =</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close"></Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">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</Keywords>
<Keywords name="Keywords2">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</Keywords>
<Keywords name="Keywords3">/ /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-</Keywords>
<Keywords name="Keywords4">\n \r\ \</Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00&quot; 01 02&quot;</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="38B86B" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="B9005C" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="0080FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="B4B80A" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="38B86B" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="B4B80A" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
 
truefriendcz
just joined
Topic Author
Posts: 14
Joined: Mon Jun 05, 2017 11:07 am

Re: Syntax highlighting for Notepad++

Fri Dec 07, 2018 3:19 pm

New v1.3 (2018-12-07):
* Associating File Extensions methodology changed
 
User avatar
Jotne
Forum Veteran
Forum Veteran
Posts: 904
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Syntax highlighting for Notepad++

Sat Dec 08, 2018 12:23 am

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
You do not have the required permissions to view the files attached to this post.
.
Use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
truefriendcz
just joined
Topic Author
Posts: 14
Joined: Mon Jun 05, 2017 11:07 am

Re: Syntax highlighting for Notepad++

Mon Jan 07, 2019 5:34 am

New v1.4 (2019-01-07):
* Disabled auto Detect Encoding for open files
* Updated Notepad++ to version 7.6.2
Last edited by truefriendcz on Mon Jan 07, 2019 6:04 am, edited 1 time in total.
 
truefriendcz
just joined
Topic Author
Posts: 14
Joined: Mon Jun 05, 2017 11:07 am

Re: Syntax highlighting for Notepad++

Mon Jan 07, 2019 5:47 am

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.
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
 
Frostbyte
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Mon Dec 25, 2017 1:42 am

Re: Syntax highlighting for Notepad++

Mon Jan 07, 2019 5:50 am

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.
 
User avatar
Jotne
Forum Veteran
Forum Veteran
Posts: 904
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Syntax highlighting for Notepad++

Mon Jan 07, 2019 1:18 pm

@MT

Can you move this thread to this folder?
viewforum.php?f=23
(Make a ghost link back here)
.
Use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
Frostbyte
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Mon Dec 25, 2017 1:42 am

Re: Syntax highlighting for Notepad++

Mon Jan 07, 2019 8:03 pm

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.

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".
 
truefriendcz
just joined
Topic Author
Posts: 14
Joined: Mon Jun 05, 2017 11:07 am

Re: Syntax highlighting for Notepad++

Tue Jan 08, 2019 2:35 pm

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.





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.

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".
Last edited by truefriendcz on Tue Jan 08, 2019 3:14 pm, edited 2 times in total.
 
truefriendcz
just joined
Topic Author
Posts: 14
Joined: Mon Jun 05, 2017 11:07 am

Re: Syntax highlighting for Notepad++

Tue Jan 08, 2019 3:10 pm

New v1.5 (2019-01-08):
* fixed an error a transparent text background
+ adding method (2b) for manual import highlight themes (Readme.txt)
 
truefriendcz
just joined
Topic Author
Posts: 14
Joined: Mon Jun 05, 2017 11:07 am

Re: Syntax highlighting for Notepad++

Tue Jan 08, 2019 3:32 pm

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

Can you move this thread to this folder?
viewforum.php?f=23
(Make a ghost link back here)
 
Frostbyte
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Mon Dec 25, 2017 1:42 am

Re: Syntax highlighting for Notepad++

Fri Jan 11, 2019 4:07 am

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.

Who is online

Users browsing this forum: No registered users and 7 guests