BlockStyler: Make Blocks more recognizable in source code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

BlockStyler: Make Blocks more recognizable in source code

Manuel Leuenberger
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.


Install with:

Metacello new
baseline: 'BlockStyler';
repository: '<a href="github://maenu/BlockStyler/repository" class="">github://maenu/BlockStyler/repository';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel
Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Stephane Ducasse-3
Hi Manuel 

This is coooooool.
How linked to nautilus it is?

Stef

On Wed, Sep 6, 2017 at 1:52 PM, Manuel Leuenberger <[hidden email]> wrote:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.


Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel

Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Manuel Leuenberger
It’s installed through a meta-link on AbstractNautilusUI >> #addIconStyle and uses RubConfigurationChange to announce on the editor’s sourceTextModel. It is not yet a proper Nautilus plugin and should be portable to Calypso, as it still uses Rubric.

On 7 Sep 2017, at 07:53, Stephane Ducasse <[hidden email]> wrote:

Hi Manuel 

This is coooooool.
How linked to nautilus it is?

Stef

On Wed, Sep 6, 2017 at 1:52 PM, Manuel Leuenberger <[hidden email]> wrote:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.

<highlight.png>

Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel


Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Denis Kudriashov
Hi.

I will look. Maybe Calypso plugins are already able to do this kind of extensions

2017-09-07 9:58 GMT+02:00 Manuel Leuenberger <[hidden email]>:
It’s installed through a meta-link on AbstractNautilusUI >> #addIconStyle and uses RubConfigurationChange to announce on the editor’s sourceTextModel. It is not yet a proper Nautilus plugin and should be portable to Calypso, as it still uses Rubric.

On 7 Sep 2017, at 07:53, Stephane Ducasse <[hidden email]> wrote:

Hi Manuel 

This is coooooool.
How linked to nautilus it is?

Stef

On Wed, Sep 6, 2017 at 1:52 PM, Manuel Leuenberger <[hidden email]> wrote:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.

<highlight.png>

Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel



Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Alistair Grant
In reply to this post by Manuel Leuenberger
Hi Manuel,

On Wed, Sep 06, 2017 at 01:52:17PM +0200, Manuel Leuenberger wrote:
> Hi everyone,
>
> I built a little syntax highlighting extension for the Nautilus source
> code pane, which puts a background color behind blocks, so that nested
> blocks are easily recognizable.

This looks really nice, however the shading isn't at all visible (to me)
with the Pharo 3 (white) theme.

How much work is it to use themes and develop a white theme?

Thanks,
Alistair


> Install with:
>
> Metacello new
> baseline: 'BlockStyler';
> repository: 'github://maenu/BlockStyler/repository';
> load
>
> GitHub: https://github.com/maenu/BlockStyler 
> <https://github.com/maenu/BlockStyler>
>
> Doesn???t work with ???Format as you read???, just as the IconStyler.
> If anybody has an idea how to integrate it properly into Nautilus as a
> plugin, let me know. Currently it???s an ugly meta-link hack to get
> access to the sourceTextModel.
>
> Cheers,
> Manuel

Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Denis Kudriashov
In reply to this post by Denis Kudriashov
And I did pull request https://github.com/maenu/BlockStyler/pull/1 which simplifies everything.
There are already IconStyler hierarchy for such kind of extensions. So I adopt your code for this and remove metalink tricks. Also I move settings directly to the BlockStyler class

2017-09-07 11:37 GMT+02:00 Denis Kudriashov <[hidden email]>:
Hi.

I will look. Maybe Calypso plugins are already able to do this kind of extensions

2017-09-07 9:58 GMT+02:00 Manuel Leuenberger <[hidden email]>:
It’s installed through a meta-link on AbstractNautilusUI >> #addIconStyle and uses RubConfigurationChange to announce on the editor’s sourceTextModel. It is not yet a proper Nautilus plugin and should be portable to Calypso, as it still uses Rubric.

On 7 Sep 2017, at 07:53, Stephane Ducasse <[hidden email]> wrote:

Hi Manuel 

This is coooooool.
How linked to nautilus it is?

Stef

On Wed, Sep 6, 2017 at 1:52 PM, Manuel Leuenberger <[hidden email]> wrote:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.

<highlight.png>

Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel




Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Manuel Leuenberger
And I merged it, thanks Denis for Calypso support and getting rid of meta-link trickery. Themes are now supported as well. It only brakes on Watery + Calypso, but I think this is a Calypso issue, not introduced by BlockStyler.

On 7 Sep 2017, at 12:07, Denis Kudriashov <[hidden email]> wrote:

And I did pull request https://github.com/maenu/BlockStyler/pull/1 which simplifies everything.
There are already IconStyler hierarchy for such kind of extensions. So I adopt your code for this and remove metalink tricks. Also I move settings directly to the BlockStyler class

2017-09-07 11:37 GMT+02:00 Denis Kudriashov <[hidden email]>:
Hi.

I will look. Maybe Calypso plugins are already able to do this kind of extensions

2017-09-07 9:58 GMT+02:00 Manuel Leuenberger <[hidden email]>:
It’s installed through a meta-link on AbstractNautilusUI >> #addIconStyle and uses RubConfigurationChange to announce on the editor’s sourceTextModel. It is not yet a proper Nautilus plugin and should be portable to Calypso, as it still uses Rubric.

On 7 Sep 2017, at 07:53, Stephane Ducasse <[hidden email]> wrote:

Hi Manuel 

This is coooooool.
How linked to nautilus it is?

Stef

On Wed, Sep 6, 2017 at 1:52 PM, Manuel Leuenberger <[hidden email]> wrote:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.

<highlight.png>

Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel





Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Esteban A. Maringolo
In reply to this post by Manuel Leuenberger
Thank you!

This is really useful in the context of Seaside render blocks.

How hard would it be to also add vertical "lines" at the sides like in the following screenshot:
Imágenes integradas 1


Best regards!


El sept. 6, 2017 8:53 AM, "Manuel Leuenberger" <[hidden email]> escribió:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.


Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel
Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Manuel Leuenberger
Well, it has something similar now:


On 7 Sep 2017, at 15:54, Esteban A. Maringolo <[hidden email]> wrote:

Thank you!

This is really useful in the context of Seaside render blocks.

How hard would it be to also add vertical "lines" at the sides like in the following screenshot:
<image.png>


Best regards!


El sept. 6, 2017 8:53 AM, "Manuel Leuenberger" <[hidden email]> escribió:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.

<highlight.png>

Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel

Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Stephane Ducasse-3
In reply to this post by Esteban A. Maringolo
Alain did it in the process browser.

On Thu, Sep 7, 2017 at 3:54 PM, Esteban A. Maringolo <[hidden email]> wrote:
Thank you!

This is really useful in the context of Seaside render blocks.

How hard would it be to also add vertical "lines" at the sides like in the following screenshot:
Imágenes integradas 1


Best regards!


El sept. 6, 2017 8:53 AM, "Manuel Leuenberger" <[hidden email]> escribió:
Hi everyone,

I built a little syntax highlighting extension for the Nautilus source code pane, which puts a background color behind blocks, so that nested blocks are easily recognizable.


Install with:

Metacello new
baseline: 'BlockStyler';
load


Doesn’t work with “Format as you read”, just as the IconStyler. If anybody has an idea how to integrate it properly into Nautilus as a plugin, let me know. Currently it’s an ugly meta-link hack to get access to the sourceTextModel.

Cheers,
Manuel

Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

CyrilFerlicot
In reply to this post by Manuel Leuenberger

On jeu. 7 sept. 2017 at 18:16, Manuel Leuenberger <[hidden email]> wrote:
Well, it has something similar now:



Hi, 

I would like to get the ratio of "darkening"/"lightening" as a setting if possible. I find the change of color a little abrupt but since it is a personal taste I would like to customize only for myself. So a setting could be cool. 

Else, this is a really cool plugin :) I'll definitively use it. 

--
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France

highlight.png (253K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Alistair Grant
Hi Manuel,

Thanks very much for making this available and taking the trouble to get
it working with the light theme as well.


On Fri, Sep 08, 2017 at 06:37:12AM +0000, Cyril Ferlicot wrote:

>
> On jeu. 7 sept. 2017 at 18:16, Manuel Leuenberger <[hidden email]>
> wrote:
>
>     Well, it has something similar now:
>
>     [cid]
>
>
> Hi,
>
> I would like to get the ratio of "darkening"/"lightening" as a setting if
> possible. I find the change of color a little abrupt but since it is a personal
> taste I would like to customize only for myself. So a setting could be cool.
>
> Else, this is a really cool plugin :) I'll definitively use it.

I was about to send exactly the same email.

When I first looked at the plugin with the dark theme (which I can't
use, as I can't see it clearly) the colour change seemed to be less
pronounced, but in the light theme, as Cyril says, it is too big a
change.

Thanks again,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: BlockStyler: Make Blocks more recognizable in source code

Manuel Leuenberger
In reply to this post by CyrilFerlicot
Hi Cyril,

There already is a setting to set the color with alpha:


On 8 Sep 2017, at 08:37, Cyril Ferlicot <[hidden email]> wrote:


On jeu. 7 sept. 2017 at 18:16, Manuel Leuenberger <[hidden email]> wrote:
Well, it has something similar now:



Hi, 

I would like to get the ratio of "darkening"/"lightening" as a setting if possible. I find the change of color a little abrupt but since it is a personal taste I would like to customize only for myself. So a setting could be cool. 

Else, this is a really cool plugin :) I'll definitively use it. 

-- 
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France
<highlight.png>