Re: [code] [textadept] In-place Menu Editing

From: Russell Dickenson <russelldickenson.att.gmail.com>
Date: Tue, 10 Jun 2014 11:09:13 +1000

Mitchell,

Awesome! Thank you.

On 10 June 2014 10:58, Mitchell <m.att.foicica.com> wrote:
> Hi Russell,
>
>
> On Tue, 10 Jun 2014, Russell Dickenson wrote:
>
>> Along the lines of a related enquiry, would this allow me to add to
>> the Textadept menu, an option to open my init.lua, perhaps with a
>> Textadept 'reset" to follow?
>>
>> I am interested in recreating an option in the Geany editor, which
>> provides easy access to the customisation files.
>
>
> Sure! Something like this should work:
>
>
> local tools = textadept.menu.menubar[4]
> tools[#tools + 1] = {'Open user init',
> {io.open_file, _USERHOME..'/init.lua'}}
>
> events.connect(events.FILE_AFTER_SAVE, function(filename)
> if filename:find('[/\\]%.textadept[/\\]init%.lua$') then
> reset()
> end
> end)
>
> Cheers,
> Mitchell
>
> --
> You are subscribed to code.att.foicica.com.
> To change subscription settings, send an e-mail to code+help.att.foicica.com.
> To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
>

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 09 Jun 2014 - 21:09:13 EDT

This archive was generated by hypermail 2.2.0 : Tue 10 Jun 2014 - 06:28:55 EDT