Re: [textadept] Re: Set the font size from home directroy

From: mitchell <c....at.caladbolg.net>
Date: Fri, 9 Jul 2010 10:16:37 -0400 (Eastern Daylight Time)

On Wed, 30 Jun 2010, Robert wrote:

> Hi,
>
> an idea for simplifying slight theme modifications (without having to
> copy themes):
> A file ~/.textadept/themes/buffer.lua could be processed (if it
> exists) after the usual theme loading for opened files or new buffers.
> There one could simply have, e.g.
>
> [snip]
>
> Maybe, a themes/view.lua as well?

Having separate ~/.textadept/{buffer,view}.lua would just cause more confusion I think.

>
> Another thing I experimented with this morning is the setting of the
> theme. I put the following function in core/init.lua:
>
> [snip]
>
> So I can switch_theme('light') from the command entry.
> Is there another way to trigger whatever it is that is happening when
> a new buffer is created?

events.emit('buffer_new') should work I think.

> The only issue I encountered so far is when switching to the Scite
> theme as some things are defined/undefined in their view.luas so some
> settings from the old theme persist. Is there a way to reset every
> theming?

Not without writing code to reset the buffer and view defaults.

> (And if no session files are loaded, the default light theme
> is loaded, the "set_theme" is only applied once I open a file)
> I think it would be nice to have functionality like this (maybe in
> 3.1), one could have the themes selectable in the menu, switch themes
> in init.lua adjusted to day time :-)

An interesting idea, but I'm not sure the added complexity is worth it. I'd be curious to see a refined version though.

mitchell
Received on Fri 09 Jul 2010 - 10:16:37 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:49:12 EST