- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Comments between /* */ and * ;
- String within single and double quotes
- SAS procedures
- SAS statements, keywords, options, etc.
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
- Comments in green
- Strings in purple
- SAS procedures in dark blue and bold
- SAS statements, keywords, options, etc. in light blue
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris, what do you mean by "Notepad++ data"? Do you mean the language definition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, what I published here:
https://github.com/cjdinger/sas-npp
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
- Comments between /* */ and * ;
- String within single and double quotes
- SAS procedures
- SAS statements, keywords, options, etc.
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
- Comments in green
- Strings in purple
- SAS procedures in dark blue and bold
- SAS statements, keywords, options, etc. in light blue