I know that there are SAS syntax highlighting extensions for various text editors like Notepad++, but is there a Gedit (text editor on Gnome) extension for SAS syntax highlighting? I am looking for syntax highlighting, not a full IDE. Any help would be greatly appreciated.
I have written a syntax highlighting file (sas.lang) and a color theme file (sascolors.xml) for editing SAS programs in Gedit. They are both XML files. I have kept these files as simple as possible, first because I am not a professional software developer, and second because I wanted these files to be updated easily. I have attached a zip file that contains both of these files.
SAS.LANG: This is the SAS language specification file for syntax highlighting in Gedit. It highlights the following:
This file should be saved in the following directory:
/.local/share/gtksourceview-3.0/language-specs/ or /.local/share/gtksourceview-4/language-specs/
SASCOLORS.XML: This is a Gedit color theme for the SAS language. This file should be saved in the following directory:
/.local/share/gedit/styles
It highlights the following
I'm not aware of anything for Gedit. The SAS extension for VS Code contains the most robust SAS syntax services/definitions that you can access in the open source world. And if Gedit supports language server extensions, some people have been able to adapt the SAS-VS Code project for use in other popular editors. See the GitHub project here and the discussions on this here.
Hi Chris,
Thanks for your prompt reply. VS Code is not available in my work environment. But I must say that SAS has done an amazing job with the SAS extension for VS Code. In my work environment, I am writing SAS programs in a text editor and submitting them in batch mode. The only two text editors available to me are Gedit and Emacs. I know Emacs has ESS which provides SAS syntax highlighting, but I like the simplicity of Gedit. Gedit has small language extension files for syntax highlighting. I am not a software developer myself, but I thought writing a SAS extension file for Gedit would not be a major undertaking like the SAS extension for VS Code. Do you think SAS might be interested in producing a SAS syntax highlighting file extension for Gedit?
Sincerely,
Cuneyt
Hi @Cuneyt - probably not as a formal effort. We're really investing in VS Code as an experience, and we can share the efforts/data with our own SAS Studio and SAS Enterprise Guide IDEs.
However, you found our simple Notepad++ data and I have similar data already for prismjs (which we use on the community here), so happy to share that if it's of interest.
Hi Chris, what do you mean by "Notepad++ data"? Do you mean the language definition?
Yes, what I published here:
https://github.com/cjdinger/sas-npp
I have written a syntax highlighting file (sas.lang) and a color theme file (sascolors.xml) for editing SAS programs in Gedit. They are both XML files. I have kept these files as simple as possible, first because I am not a professional software developer, and second because I wanted these files to be updated easily. I have attached a zip file that contains both of these files.
SAS.LANG: This is the SAS language specification file for syntax highlighting in Gedit. It highlights the following:
This file should be saved in the following directory:
/.local/share/gtksourceview-3.0/language-specs/ or /.local/share/gtksourceview-4/language-specs/
SASCOLORS.XML: This is a Gedit color theme for the SAS language. This file should be saved in the following directory:
/.local/share/gedit/styles
It highlights the following
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.