How to: {{Moustache}} code highlighting for Notepad++
-
Hi folks!
I have some .php files with Moustache {{}} code in them, and would like the code to be “highlighted correctly” by Notepad++.
At the moment all is black and unrecognised!
What steps must I undertake to enable Moustache{{ }} code highliting?
Please do a step by step as i’m not a seasoned programmer, just content writer who happens to have fall in love with Notepad++ ;)
Thanks!
-
-
Dear Claudia
Thank you for your answer. Does that mean that it is not possible let alone easy to have {{moustache}} syntax working in Notepad++?
Greetings, Sam
-
Does that mean that it is not possible let alone easy to have {{moustache}} syntax working in Notepad++?
Yes, the only save way to make this happen is to change the lexer.
Cheers
Claudia -
RegEx Helper as a plugin can offer some help (assuming that RegEx Helper is already installed):
Open your file in Notepad++
Set the language to Php
Launch the plugin using Ctrl+F12
Type in the “Regular Expression” window: ({{)|(}})
Turn on the highlighting using ‘Mark’ button.Tested using this Moustache template:
<strong>Hello, {{firstname}}</strong><br>
<p>You are visitor number {{visitorNumber}}.</p>
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login