Re: [textadept] theme tweaking

From: mitchell <c....at.caladbolg.net>
Date: Wed, 8 Dec 2010 09:20:30 -0500 (Eastern Standard Time)

Robert,

> On Wed, Dec 8, 2010 at 9:34 AM, Scott Weisman <sweis....at.gmail.com> wrote:
> [...]
>> events.connect('buffer_after_switch', set_font)
>> events.connect('view_after_switch', set_font)
>
> I use file_opened, buffer_new and view_vew for this purpose now.

Since font face is universal this is not a problem, but if some lexers
were to use a different face for some styles, then file_opened,
buffer_new, and view_new wouldn't be enough since the style settings are
changed between buffer switches. Technically setting the font should be
done on the *_after_switches, but generally it does not matter.

mitchell

>
>>
>> However, the buffer.lua file in the theme makes no mention of fonts,
>> and indeed the above doesn't have any effect on the font. It does
>> modify the tab settings.
>>
>> Did something change since I last tried this? I think I wrote it for
>> TA 3.0. How do you tweak the font?
>>
> Don't know about the font, but maybe it's easier to copy the theme you
> would like to use to your .textadept and change the font there. It's
> enough to copy only the lexer.lua file and change the font there to
> minimize tracking changes in Textadept's core.
> E.g copy themes/dark/lexer.lua to ~/.textadept/themes/dark/lexer.lua
>
>> Another question. I like the TA file_browser I found. How do I bind it
>> to a key (eg keys.co) to start in either the directory of the
>> currently viewed buffer, or if no file is already open, the cwd?
>>
>> keys.co = { function() �_m.textadept.file_browser.init(BUFFER_DIR or
>> CWD) end }
>>
> if buffer.filename then
> local buffer_dir = buffer.filename:match('(.+)[/\\]
> end
>
> Current working dir, possibly something like:
> local lfs = require 'lfs'
> local cwd = lfs.currentdir()
>
> Robert
>
> --
> You received this message because you are subscribed to the Google Groups "textadept" group.
> To post to this group, send email to textadept.at.googlegroups.com.
> To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/textadept?hl=en.
>
>

mitchell
Received on Wed 08 Dec 2010 - 09:20:30 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:55:38 EST