theme tweaking

From: Scott Weisman <>
Date: Wed, 8 Dec 2010 00:34:25 -0800 (PST)

I'm making a serious go of migrating to TA again (I tried earlier this
year and grew frustrated) and am finding some of my earlier tweaks
aren't working now.

Eg I want to change the font without having to edit the theme file(s).
I had this in my init.lua:

local function set_font()
    local c = _SCINTILLA.constants
    local buffer = buffer
    buffer.style_font[0] = 'Consolas'
    buffer.zoom = 0
    buffer.tab_width = 4
    buffer.indent = 4
    buffer.margin_width_n[0] = 4 + 3 *
buffer:text_width(c.STYLE_LINENUMBER, '9')

events.connect('buffer_after_switch', set_font)
events.connect('view_after_switch', set_font)

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?

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 }
Received on Wed 08 Dec 2010 - 03:34:25 EST

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