Version 8 (modified by Charles, 12 years ago) |
---|
Attached to this page is a syntax highlighting file for GtkSourceView which is used by gedit, scribes and other editors/IDEs.
In the text below, use 3.0 or 2.0 in place of VER depending on what version of GTK you are using.
Download "cobra.lang" from this page and put it in the correct directory. Under Windows:
- Windows XP/Vista/7: %userprofile%\My Documents\gtksourceview-VER\language-specs\ (%homepath% can be used instead of %userprofile%)
- It can be also be placed in %programfiles%\gedit\share\gtksourceview-VER\language-specs\ but for security reasons the OS will throw any modified data into a virtualized directory. For example, that might be %userprofile%\AppData\Local\VirtualStore\...
Under Mac, Linux and other UnixLike systems, put "cobra.lang" in (root)/share/gtksourceview-VER/language-specs where (root) is one of:
- ~/.local
- /opt
- /usr/local
- /usr
Editors that use GtkSourceView:
Troubleshooting
- Verify that the file is called "cobra.lang" and has not been mangled during downloading such as being called "cobra.lang.xml".
- Verify that the file starts with "<?xml version="1.0" encoding="UTF-8"?> <language id="cobra" _name="Cobra" version="VER" _section="Sources">" and is not wrapped in HTML (again a potential problem from browser downloads).
- Verify that the path is correct.
Background
Gtk/Gnome? text editors typically use a common library component called GtkSourceView which means that adding Cobra language support for it enhances multiple applications. If you are specifically using gedit, they have a NewLanguage wiki page with instructions. Also, note that gedit is available for Windows, Mac and Linux.
See Also
Attachments
- cobra.lang (13.4 KB) - added by webnov8 15 years ago.
-
cobra.2.lang
(13.4 KB) - added by todd.a
15 years ago.
Updated to handle keywords as method names
- cobra.3.lang (13.4 KB) - added by todd.a 15 years ago.
-
cobra.4.lang
(13.1 KB) - added by nevdelap
14 years ago.
Support nested block comments.
-
cobra.5.lang
(13.1 KB) - added by nevdelap
14 years ago.
Removed 'fake' because it is deprecated, added 'readonly'.