Go to ToolsoptionsGeneralAdvanced


Windows Paste the following in Text Editor command

C:\Program Files\Sublime Text 3\subl.exe %s 

on a Mac type the following command

/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl %s

On Linux type

subl %s

Goto sublime and open package manager and install gmsh-Tools


After installation open a geo file and on the bottom right click on Plain text and go to Open all with current extension as … → gmsh.image-20210309104045408

Now you will get color coded gmsh files