Re: [code] Filter through fmt

From: Mitchell <m.att.foicica.com>
Date: Sat, 19 Apr 2014 09:49:44 -0400 (EDT)

Hi Carlos,

On Fri, 18 Apr 2014, Carlos Pita wrote:

> Hi all,
>
> when editing commit messages with textadept I often filter a text
> paragraph through fmt in order to reflow it constrained to a maximum
> number of columns.
>
> How can I configure a keyboard shortcut to automate this? That is, how
> can avoid typing the fmt command each time?

Put the following in your ~/.textadept/init.lua:

   keys['aa'] = {textadept.editing.filter_through, 'fmt'}

Typing Alt+A call on Textadept's "filter through" capabilities with the
'fmt' command. You can of course change the key and command to suit your
needs.

The manual has more information on key binding preferences[1] and
Textadept's `modules/textadept/keys.lua` has plenty more examples.

Cheers,
Mitchell

[1]: http://foicica.com/textadept/08_Preferences.html#Key.Bindings

-- 
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 Sat 19 Apr 2014 - 09:49:44 EDT

This archive was generated by hypermail 2.2.0 : Sun 20 Apr 2014 - 06:41:55 EDT