Sunday 3 March 2019

How to enhance Notepad++ to support Laravel blade syntax highlighting in a PHP file?

After looking online I cannot find any info on enhancing N++ to support syntax highlighting for Laravel's Blade syntax (*.blade.php).


Example: demo.blade.php




App Name - @yield('title')


@section('sidebar')
This is the master sidebar.
@show


@yield('content')




I know Notepad++ supports user-defined languages to add syntax highlighting support for new file extensions (I have used this before for *.scss files).


However, I want to continue using N++'s built in highlighting for *.php files and add to it by creating rules to match the Blade syntax within a PHP file. If I was to use N++'s user-defined language functionality for Blade files, I would also have to re-define all the syntax highlighting for PHP syntax.


I have attempted to modify N++'s langs.xml and stylers.xml files under the PHP definition but with no luck.


Therefore, how would I enhance N++ to provide syntax highlighting support for Blade? This was my starting point which is Blade highlighting in Sublime.

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...