LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-27-2012, 01:09 PM   #1
fortore
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
Custom syntax highlighting on Gedit


I want the plus signs (+) to be highlighted everywere in the text. How does the .lang-file have to look like? The name for this highlight should be 'ABC' and it includes all '.abc'-files.

I tried to start like this (a lot of it is just copied and has to be customized but I do not know how):

Code:
<?xml version="1.0" encoding="UTF-8"?>
<language id="abc" _name="ABC" version="2.0" _section="Markup">
  <metadata>
<property name="mimetypes">text/plain</property>
<property name="globs">*.abc</property>
  </metadata>
  <styles>
<style id="indent2" _name="2x indented"  map-to="def:headword" />
  </styles>

  <definitions>
    <context id="headword" style-ref="comment" class="comment" class-disabled="no-spell-check">
  <start>+</start>
      <include>
        <context ref="def:headword"/>
      </include>
    </context>
  </definitions>
</language>
 
Old 05-28-2012, 09:58 PM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
https://live.gnome.org/Gedit/NewLanguage
This page tells you how to do it:
http://developer.gnome.org/gtksource...-tutorial.html
(simple regex)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gedit: Syntax highlighting slow for large files Arancaytar Linux - Software 4 07-07-2009 07:16 AM
Need text editor w/ GOOD CUSTOM SYNTAX HIGHLIGHTING. (Dont care what langs come with) bdb4269 Programming 3 05-02-2007 04:17 AM
Syntax highlighting in Gedit jriis Linux - Software 1 10-24-2005 07:16 AM
GEdit syntax highlighting for ruby dublinclontarf Programming 0 08-18-2004 02:19 PM
Is it possible that you can set up syntax highlighting for gedit? ICO Linux - General 3 12-18-2003 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration