File Exchange syntax highlighter

This userscript lets the users to view syntax-highlighted .m files in the File Exchange section.
191 Downloads
Updated 9 Oct 2014

View License

Userscripts let the user to customize the appearance of web pages by JavaScript.
This script is based on the MATLAB Highlighter and lets the users to view syntax-highlighted .m files in the File Exchange section. Of course you can download the .m files, and open them in the MATLAB editor, but this syntax highlighter provides a convenient way to get colored code just in your browser if you want to have a short look at them.

The tool was tested in Firefox and Chrome: Firefox users can use this script by the Greasemonkey userscript handler, while Chrome users can activate it by using the Tampermonkey extension. See more details for other browsers below.

Any comments, requests are welcome.

Installation instructions

Firefox
- Install the Greasemonkey addon from https://addons.mozilla.org/hu/firefox/addon/greasemonkey/
- For manual install: download the file and add it by the New script... option.
- For automatic install:
- Click on http://matlabtricks.com/highlighter/matlab-highlighter-0.98.user.js
- Greasemonkey extension will pop-up a window to help installing the script

Chrome
- Install the Tampermonkey addon from https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo
- For manual install: download the file and add it by the Add a new script... option.
- For automatic install:
- Click on http://matlabtricks.com/highlighter/matlab-highlighter-0.98.user.js
- Tampermonkey extension will open a page to help installing the script

Opera
- Opera supports user scripts natively, but you have to install the script manually.
- More information: http://www.opera.com/docs/userjs/using/#whatcando

IE
- It seems hard to use userscripts under IE, but it may be possible... More information:
- http://wiki.greasespot.net/Cross-browser_userscripting#Internet_Explorer
- http://stackoverflow.com/questions/18305943/how-to-make-this-userscript-run-on-ie10

Safari
- I have found the following pages describing how to run userscripts on Safari:
- http://wiki.greasespot.net/Cross-browser_userscripting#Safari
- http://apple.stackexchange.com/questions/6953/are-there-greasemonkey-scripts-for-safari

Enjoy the colorful source codes in the File Exchange section :)

Cite As

Zoltan Fegyver (2024). File Exchange syntax highlighter (https://www.mathworks.com/matlabcentral/fileexchange/48047-file-exchange-syntax-highlighter), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Files and Folders in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3.0.0

Extended installation instructions for other browsers.

1.2.0.0

Improved description and installation instructions.

1.1.0.0

Fixed description and screenshot.

1.0.0.0