Re: Set the font size from home directroy

From: mitchell <mforal.n....at.gmail.com>
Date: Tue, 22 Jun 2010 12:04:21 -0700 (PDT)

Scott,

On Jun 22, 2:56 pm, Scott Weisman <sweis....at.gmail.com> wrote:
> I know very little about Lua yet, but this seems kind of overkill to
> me.
>
> If I want to change a single variable in a module, can't I do so from
> another file (eg init.lua)? What if I want to mostly keep the default
> settings but just want to tweak a few that happened to be scattered
> about a bunch of files? By being able to do so in a single file, I can
> exactly what I've tweaked. I don't want to have to reproduce the
> entire source tree to make changes.

As mentioned, lexer and textadept Lua states are separate from each
other (for good reason). There is no choice here. However, as ta has
evolved, users like you have pointed out the usefulness of being able
to change module options from files like user init.lua. As a result,
most everything in ta is accessible from the global state rather than
having to resort to editing modules directly.

Mitchell

>
> Scott
>
> On Jun 22, 6:04 pm, mitchell <mforal.n....at.gmail.com> wrote:
>
> > Ryan,
>
> > On Jun 22, 10:46 am, Ryan Pusztai <rpusz....at.gmail.com> wrote:
>
> > > Hi Mitchell,
>
> > > On Tue, Jun 22, 2010 at 10:41 AM, mitchell <mforal.n....at.gmail.com> wrote:
> > > > Hi Ryan,
>
> > > > You will want to edit your theme file's lexer.lua. Set the font_size
> > > > variable.
>
> > > There is no way to do that from outside the theme? If not, shouldn't there
> > > be? I was under the impression that you should not change
> > > the distribution files because they will be overwritten when a new version
> > > comes out. Also there are at least three themes and I would have to change
> > > each one, instead of just overwriting the setting in the 'init.lua' file (or
> > > what ever file in you _USERHOME directory).
>
> > Well the idea would be to pick the theme you like, copy it to your
> > ~/.textadept/themes/ folder, and modify the theme from there. You do
> > not have to modify 3 themes unless you use them all.
>
> > Scintillua's lexer Lua state is separate from Textadept's, so the only
> > way to modify fonts from init.lua would be through calls to Scintilla
> > via buffer.style_*. However, I doubt those settings would persist.
>
> > Mitchell
>
> > > Thoughts?
> > > --
> > > Regards,
Received on Tue 22 Jun 2010 - 15:04:21 EDT

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