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

From: Mitchell <>
Date: Thu, 21 Jun 2018 08:32:33 -0400 (EDT)

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


> Also a feature request: If the shell command exits with failure, the text in
> the buffer shouldn't be changed. At the moment, a failure will delete all
> text.

Thanks for the suggestion. I will consider this.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 21 Jun 2018 - 08:32:33 EDT

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