Re: [code] [textadept] diff mode for textadept

From: Robert <rob.g.att.web.de>
Date: Mon, 10 Jun 2013 16:38:24 +0200

On Mon, Jun 10, 2013 at 4:14 PM, Mitchell <m.att.foicica.com> wrote:
> Benjamin,
>
>
> On Mon, 10 Jun 2013, Benjamin Kober wrote:
>
>> Hi,
>>
>> it would be great to have something like vimdiff for textadept. Right
>> now it seems to be impossible to implement it because the lexer depends
>> always on lpeg patterns and can not be related to the contents of
>> another buffer.
>>
>> What about providing a function in lexer which could (if set) overwrite
>> the way _rules where handled and returns a table with folds and tokens?
>>
>> Another problem are the lines that exist in one file and not in the
>> other (thus have a need for blank space in a buffer which is not a
>> blankline).
>>
>> Any ideas on this?
>
>
> If you set the lexer to 'text' or create a blank lexer, you should be able
> to manually set styles through the API. This is definately a difficult task
> though, and I'm also not sure if it's possible at the moment.

you could look into Textredux [1] and its style functionality [2].
If you add
buffer.read_only = false
to the `create_style_buffer` function in the example you can write to
it, though unstyled.

Robert

[1] http://rgieseke.github.io/textredux/
[2] https://github.com/rgieseke/textredux/blob/master/examples/buffer_styling.lua

> Cheers,
> Mitchell
>
> --
> You are subscribed to code.att.foicica.com.
> To change subscription settings, send an e-mail to code+help.att.foicica.com.
> To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
>

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 10 Jun 2013 - 10:38:24 EDT

This archive was generated by hypermail 2.2.0 : Tue 11 Jun 2013 - 06:26:14 EDT