Difference between revisions of "Text Filters"
(→User created Text Filters) |
|||
Line 12: | Line 12: | ||
* [http://bbedit-hints.tumblr.com/post/12327257363/more-useful-clipping-placeholders Remove BBEdit placeholder brackets from clippings] | * [http://bbedit-hints.tumblr.com/post/12327257363/more-useful-clipping-placeholders Remove BBEdit placeholder brackets from clippings] | ||
* [http://www.mtaa.net/mtaaRR/news/twhid/geek/use_node_js_with_bbedit_text_filters_feature.html Use Node.js in text filters (examples to en/decodeURIComponent)] | * [http://www.mtaa.net/mtaaRR/news/twhid/geek/use_node_js_with_bbedit_text_filters_feature.html Use Node.js in text filters (examples to en/decodeURIComponent)] | ||
+ | * [https://github.com/sbecker/asset_packager/blob/master/lib/jsmin.rb JavaScript Minifier] |
Revision as of 11:47, 2 February 2013
Text Filters accept the selection range (or entire document, if no selection) as input, and return text that replaces the selection range (or document). They may contain Unix scripts, AppleScript files, text factories, and Automator workflows. The selected text (or front document contents, if there is no selection) is passed as `argv[1]` to Unix executables, as a string to text factories, as a reference to a `RunFromBBEdit` entry point in AppleScripts, as text input to Automator workflows, and as a source to text factories.
Starting with BBEdit 10.1, text input is passed to Unix executables via `stdin`, not `argv[0]`.
Text filters live in ~/Library/Application Support/BBEdit/Text Filters. To use a Text Filter, select Apply Text Filter from the Text menu.