[Geany-devel] custom formatting for selections 'sent to terminal'

Liviu Andronic landronimirc at xxxxx
Mon Dec 27 19:36:58 UTC 2010

On Mon, Dec 27, 2010 at 12:11 AM, Frank Lanitz <frank at frank.uvena.de> wrote:
> On Sat, 18 Dec 2010 07:46:37 -0800
> Matthew Brush <matthewbrush at gmail.com> wrote:
>> On 12/18/2010 02:51 AM, Liviu Andronic wrote:
>> > However, can the VTE be flexible enough to allow certain lines to have
>> > a different formatting? I am interested in selections 'sent to
>> > terminal': would it be feasible to have an option that would ensure,
>> > for example, that any 'selection sent to terminal' would be formatted
>> > in red colour in the VTE?
>> One way that might work would be to "encode" the text before it's sent
>> with color escape sequences that the terminal already recognizes[1].
I looked into this, but in my understanding when working with R we no
longer deal with a "traditional" terminal that would recognize such
escape sequences: the selection, including potential wrap-up
sequences, are sent to the R interpreter, which is a whole different
beast. From my investigations I don't think that the R terminal can
easily handle such sequences, or anything similar. There are some R
packages/functions that can apply custom formatting to supplied
inputs, but not in the way I'm looking for.

>> I'm not sure if this could be done from a plugin, but it could probably
>> be done in Geany's source code, although considering how esoteric  an
>> option it is, it seems unlikely to be a desired feature for most.  I
>> could be wrong.
> I'm not sure something like that is fitting into core, but also not
> sure at the moment whether it can be done as a plugin.
I had some hope in Pygments [1], a generic syntax highlighter that can
be used as a command-line tool and as a library, but I'm not sure
whether such integration with the VTE is possible. And I'm even less
convinced that this has much to do with Geany; it seems more like a
job for an R package to provide integration with Pygments.


[1] http://pygments.org/

> Cheers,
> Frank
> --
> Frank Lanitz <frank at frank.uvena.de>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Do you know how to read?
Do you know how to write?

More information about the Devel mailing list