Re: Request for a "Rewrap paragraph" function

From: Brian Schott <briancsch....at.gmail.com>
Date: Thu, 08 Apr 2010 23:47:29 -0700

On 04/08/10 20:37, phayz wrote:
> On Apr 8, 3:33 pm, "briancsch....at.gmail.com" <briancsch....at.gmail.com>
> wrote:
>
>> Uploaded. This new version fixes several bugs.
>>
>> http://caladbolg.net/textadeptwiki/index.php?n=Main.Linewrap
>>
>
> Brian,
>
> It's your friendly neighbourhood dummy here. How do I enable this
> function/module?
>
>
> Regards,
>
> Russell Dickenson
>
The same way all the other functions bound to key presses are enabled.
See also: http://www.youtube.com/watch?v=lMTrthePKU0

Kidding. Ignore Fred and do this:

1)
Place it somewhere in .textadept. Preferably modules/common/. If you put
it elsewhere, change the package declaration on line 27.

2)
"require" the module somewhere in your ~/.textadept/init.lua (Or a file
required by it. I have an init.lua in ~/.textadept/modules/common that
has require statements for all modules in that folder.)

3)
Add something like this to your key_commands.lua if you want this
function available globally:
-- Line wrap
local m_wrap = _m.common.wrap
keys.ch = { m_wrap.wrap_lines }

- Brian
Received on Fri 09 Apr 2010 - 02:47:29 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:41:13 EST