Questions tagged [gtksourceview]

GtkSourceView is a portable C library that extends the standard GTK+ framework.

GtkSourceView is a portable C library that extends the standard GTK+ framework for multiline text editing with support for configurable syntax highlighting, unlimited undo/redo, UTF-8 compliant caseless searching, printing and other features typical of a source code editor.

GtkSourceView is licensed under the GNU LGPL 2.1 and is part of the GNOME Desktop Environment.

87 questions
1
vote
0 answers

GTKSourceView Language Markdown HTML Comment

I've edited the gtksourceview language file for markdown from Jean-Philippe Fleury. Here is my improved version: https://gist.github.com/ZelphirKaltstahl/de2b725ef5adba0a150dd27a5f7b66dc This one uses markdown specific styles, which I defined in an…
Zelphir Kaltstahl
  • 5,722
  • 10
  • 57
  • 86
1
vote
1 answer

Embedding keywords in other keywords: context in gtksourceview

I'm writing a syntax highlighting file in gtksourceview for PARI/GP. There's one aspect that has me stuck: I want to highlight certain keywords only while inside another keyword. In particular, I want one kind of highlighting for "log"…
Charles
  • 11,269
  • 13
  • 67
  • 105
1
vote
1 answer

Change markers/icons from tab space on GtkSourceView

How can I change (if I can) These icons/markers? I could not find any docs about that! I'm using python, and custom scheme style, but any idea can help
1
vote
1 answer

export PDF with custom GtkSourceView syntax highlighting via terminal

I created a custom syntax highlighting configuration for Gedit/GtkSourceView. It has worked well for my purposes, but now I am trying to find a way to export the highlighted text files as PDF via the Linux terminal. I know that this is possible…
Variadicism
  • 624
  • 1
  • 7
  • 17
1
vote
0 answers

Trying to load a file into a gtksourceview buffer

Im trying to write a basic text editor with GTK3 and GtkSourceView but im running into some issues when loading a file into my buffer. Im new to both Gtk and GtkSourceView so apologies if im missing something obvious. Here is the function in…
Hamish
  • 11
  • 2
1
vote
1 answer

Problems with matches containing space for gtksourceview?

I'm working on improving syntax highlighting for Ada in gtksourceview (currently, it is very outdated and very incomplete). An issue I'm having, is Ada is very positional, so matching many constructs requires matching those positions. I was able to…
Patrick Kelly
  • 633
  • 5
  • 22
1
vote
1 answer

GtkSource module not importing in Python

I am trying to build a source code editor using python and gtk, and I get the following error when I run my script: AttributeError: 'gi.repository.Gtk' object has no attribute 'Source' Below is my code, I have installed all dependencies (That I have…
Jackson
  • 15
  • 5
1
vote
1 answer

How to implement gtksourceview2.CompletionProvider?

I want to add code completion to my little application. I created my completion provider, added it to completion object in my source view but unfortunately something is not working :P When I run my test application (listed below) I get error: app =…
BPS
  • 1,133
  • 1
  • 17
  • 38
1
vote
1 answer

GtkSourceView syntax highlighting - highlight until "=",

I have a custom SPICE (electronics) syntax highlighting for gEdit, it's working, but I would like to modify the highlighting for variables (and I don't know how to). What I have now is this:
Vlad
  • 75
  • 5
1
vote
1 answer

gtksourceview undo, undoing more than expected

I'm writing a text editor, and I seem to be not understanding something about gtksourceview and undo. I would like the undo operation to undo a single operation with each call, but it seems to want to do more than that. Here is an example: I type…
nomadicME
  • 1,389
  • 5
  • 15
  • 35
1
vote
2 answers

gtksourceview keyword escaping

In my language a keyword is the literal #list-empty? so I would like to match against this. I am using gtksourceview to provide syntax highlighting, and using the following definition list-empty? However, that matches list-empt…
Heptic
  • 3,076
  • 4
  • 30
  • 51
1
vote
1 answer

Using overlapping patterns in GtkSourceView

Does anyone know if there is a way to specify overlapping patterns in a GtkSourceView 3 XML language file? For example, in the text below, is there a way to highlight "some text..." between foo and bar in one color and "some more text..." between…
August Karlstrom
  • 10,773
  • 7
  • 38
  • 60
1
vote
1 answer

How can I match a number with an optional letter suffix in a GtkSourceView language specification?

I'm writing a new GtkSourceView language specification; following the information found in the tutorial and on other internet resources. The language that I'm defining can take a digit as: One or more digit characters Optionally an appened (e.g.…
Miguel
  • 1,966
  • 2
  • 18
  • 32
1
vote
2 answers

how to parse text in C from gtktextview/gtksourceview

I am writing a text editor in C using gtk+-2.0 & gtksourceview-2.0. I'm trying to run a number of tests on the data I am extracting from the buffer. Currently I am moving a pair of iters then getting a block of text delimited by these iters. Then…
nomadicME
  • 1,389
  • 5
  • 15
  • 35
0
votes
0 answers

How to define blocks without ending notation in GtkSourceView for gEdit?

My source syntax is combination of blocks starts with # following block name and ends when another block is defined: #php // some php code // some php code // some php code #JavaScript // some Java Script // some Java Script //…
Reza
  • 111
  • 7