George Syntax highlighting for Notepad++, SublimeText and online

A forum dedicated to George scripting questions
Post Reply
User avatar
Jeremy Richard
Posts: 33
Joined: 16 Oct 2021, 01:44
Contact:

George Syntax highlighting for Notepad++, SublimeText and online

Post by Jeremy Richard »

Here is my first attempt at creating some syntax higlighting for Notepad++, Sublime Text and online. It comes with a dark and a light theme.

Hopefully it covers all of George's syntax. Feel free to change the colours if you wish.

Coloration syntaxique pour George.jpg

Notepad++
Download for Notepad++ .zip 2MB
Spoiler : How to install :
  1. Download the files
  2. Inside Notepad++, in the top bar menu, go to Settings > Preferences...
  3. In the Preferences window that pops up, select 'Dark Mode' on the left hand side then tick 'Dark mode' and close the Preferences window.
  4. Still in the top bar menu, go to Language > User Defined Language > Define your language...
  5. A "User Defined Language" window pops up, in which we press the 'Import..' button
  6. In the explorer window that appears, browse where we downloaded the files then select the George-Dark.xml file and click 'Open' to confirm
  7. A little window will pop up stating "Import successful", confirm by pressing "OK"
  8. Close the 'User Defined Language' window and the main Notepad++ window
  9. Restart Notepad++
  10. In the top bar menu, go to Language and select George Dark in the list (all the way down)
  11. Open a .grg file and the syntax will be highligthed in glorious colours.
Instruction pour Notepad++ en français

SublimeText
Download for Sublime Text .zip 279KB
Spoiler : Installation :
  1. Download the zip file and unzip it
  2. copy the folder named George in the Packages folder of Sublime Text, located:
    * on Windows: %APPDATA%\Sublime Text\Packages
    * on Linux: ~/.config/sublime-text/Packages
    * on macOS: ~/Library/Application Support/Sublime Text/Packages
  3. Inside Sublime Text, go to the top bar menu and choose Preferences > Select Color Scheme…
  4. A list of color schemes appears; select george_dark or george_light.
  5. Open a .grg file, and its syntax will be highlighted in glorious colours.
Instruction pour Sublime Text en français

Online
An example of the web version
Download for the web version .zip 20KB
Spoiler : Setup :
Add these following lines in the <head> of your web page:
<script type="text/javascript" src="georgeHighlighting.js"></script>
<link rel="stylesheet" type="text/css" href="george-highlighting.css"/>

Then add an extra data attribute with the value of 'george' to the <pre> tag in which we place our code:
<pre data-lang="george">

And finally add the class which determines which theme we want, dark or light:
<pre data-lang="george" class="dark">
Instruction pour la version web en français

--------------------------------------------------------------------------------------
EDIT:
01/07/2023:
  • Sublime Text: both themes are within one folder instead of two
  • fix issue with the strings' highlighting for both Sublime Text and Web version
Xavier
Posts: 1854
Joined: 01 Oct 2019, 11:08

Re: George Syntax highlighting for Notepad++, SublimeText and online

Post by Xavier »

Wow, well done ! Who would have expected George to remain for so long ? ^^
Svengali
Posts: 1560
Joined: 28 Dec 2006, 10:08

Re: George Syntax highlighting for Notepad++, SublimeText and online

Post by Svengali »

Hello Xavier! Pleased to see your name again... Hope things are going well for you...

As for GEORGE? Yes, it continues to be handy and useful... each week I manage to create some new custom tool or Button/script essential to my work.

sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Post Reply