Re: [textadept] theme tweaking

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


> On Wed, Dec 8, 2010 at 9:34 AM, Scott Weisman <> 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.


>> 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 to start in either the directory of the
>> currently viewed buffer, or if no file is already open, the cwd?
>> = { 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
> To unsubscribe from this group, send email to
> For more options, visit this group at

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