LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-01-2015, 02:23 PM   #1
CVAlkan
Member
 
Registered: Nov 2012
Location: Northwest suburbs of Chicago
Distribution: Ubuntu & Mint LTS, Manjaro Rolling; Android
Posts: 242

Rep: Reputation: Disabled
Configuring Language Recognition in GEdit


In GEdit, there is fairly good built-in support for SQL keyword highlighting and such, but it only recognizes the /* */ form of comments. When creating scripts for Oracle, which can also use a pair of dashes (-- ) at the beginning of a line as a single line comment, GEdit highlights key words in such single line comments, which is slightly distracting.

I've looked under root, and also under Home/.config/gedit, and can't locate any place where the language definitions are located so I can add single line comment recognition to GEdit. Does anyone know how I might go about doing this?

I'm using Ubuntu 14.04 by the way.

Thanks.
 
Old 01-03-2015, 09:50 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Gedit uses gtksourceview to define syntax highlighting for several languages. The files are xml and are located in /usr/share/gtksourceview-3.0/language-specs/.

Since you mentioned SQL, the file would be /usr/share/gtksourceview-3.0/language-specs/sql.lang.

Copy that file to ~/.local/share/gtksourceview-3.0/language-specs/sql.lang, then edit to get the highlighting you want.

You can find a tutorial and a reference document here.
 
Old 01-03-2015, 12:38 PM   #3
CVAlkan
Member
 
Registered: Nov 2012
Location: Northwest suburbs of Chicago
Distribution: Ubuntu & Mint LTS, Manjaro Rolling; Android
Posts: 242

Original Poster
Rep: Reputation: Disabled
Wow - I never would have stumbled on that location unaided. Thanks very very much. I was only able to take a quick peek, but I'm sure that's where I'll be able to do what I need.
 
  


Reply



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
[SOLVED] Changing shortcut keys for gedit using /.config/gedit/accels has no impact in program charlemagne-is-my-son Linux - Software 1 12-16-2014 08:16 AM
Gnome 3, Gedit 3.0.5, when I open file with gedit, it created one more unneeded tab Mr. Alex Linux - Software 1 06-18-2011 07:58 AM
Change gedit language from Turkish to English? walterbyrd Linux - Software 2 02-21-2010 03:30 AM
system-config-printer error when configuring the printer for other language(Chinse) amit_pansuria Linux - General 4 08-04-2009 12:34 AM
Gedit, right click to change language General Linux - Software 1 05-17-2006 11:23 PM

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

All times are GMT -5. The time now is 07:05 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
Open Source Consulting | Domain Registration