Re: [code] Key binding to run a hardcoded filter

From: Emil Axelsson <78emil.att.gmail.com>
Date: Thu, 21 Jun 2018 15:45:29 +0200

Den 2018-06-21 kl. 14:32, skrev Mitchell:
> Hi Emil,
>
> On Thu, 21 Jun 2018, Emil Axelsson wrote:
>
>> Hi!
>>
>> How can I make a key binding to run a specific filter on the selected
>> text?
>> Like the existing binding ^-\ (in curses) but without having to type the
>> shell command.
>
> Putting something like this into your *~/.textadept/init.lua* should work:
>
>   keys['c\\'] = function() textadept.editing.filter_through(command) end
>
> (See
> https://foicica.com/textadept/api.html#textadept.editing.filter_through)

Works perfectly, thanks!

/ Emil

-- 
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 Thu 21 Jun 2018 - 09:45:29 EDT

This archive was generated by hypermail 2.2.0 : Fri 22 Jun 2018 - 06:29:18 EDT