Re: [textadept] theme tweaking

From: Robert <ro....at.web.de>
Date: Wed, 8 Dec 2010 12:50:58 +0100

Hi Scott,

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.

>
> 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
Received on Wed 08 Dec 2010 - 06:50:58 EST

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