Re: [code] [textadept] Textadept used as a "simple advanced viewer"

From: Pascal <patatetom.att.gmail.com>
Date: Wed, 28 Aug 2013 09:17:12 +0200

May be in the wiki... ;-)

2013/8/28 Pascal <patatetom.att.gmail.com>

> Fine! :-)
> Textadept is remarkably flexible!
> Again, excellent work!
> Regards
>
>
> 2013/8/27 Mitchell <m.att.foicica.com>
>
>> Hi,
>>
>>
>> On Tue, 27 Aug 2013, Pascal wrote:
>>
>> Note that I use TA 6.6 and that this (old) version does'nt have the "
>>> properties.lua" facility.
>>>
>>> My idea is to create a "viewer" profile in which TA would start without
>>> menu
>>> (--M.menu = require('textadept.menu'))
>>> and open all documents (args or ctrl-o) in read-only mode.
>>>
>>> TaV (for textadeptviewer) will be a wrapper to TA called with the
>>> "viewer"
>>> profile (--serhome)...
>>>
>>
>> In your ~/.textadept/init.lua you could put something like this:
>>
>> args.register('-vm', '--view-mode', 0, function()
>> -- Make all opened buffers read-only.
>>
>> events.connect(events.FILE_**OPENED, function()
>> buffer.read_only = true
>> end)
>> -- Hide the menubar.
>> gui.menubar = {}
>> end, 'View-only mode')
>>
>> Then call ta like this:
>>
>> textadept --view-mode foo.lua bar.lua -e [lua_code]
>>
>> No need to have a "profile" :)
>>
>> 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 Wed 28 Aug 2013 - 03:17:12 EDT

This archive was generated by hypermail 2.2.0 : Wed 28 Aug 2013 - 06:25:36 EDT