Run external command to replace selected text
Posted: Wed Nov 30, 2011 1:20 am
What I would like to be able to do is select a block of text (not in block mode although this could be handy) then run an external program that is passed the start line (and possibly column) and end line (and optionally column) of the selected text. Calling the program would need to save the existing file before calling the external program is run. This would allow processing of this part of the text and updating the existing file. It would be handy if stdout from the program could replace the selected text to avoid the need to rewrite the file from the program and then reload in Textpad.
Why you ask! Well it would be nice to be able to apply some specific formatting to the selected text, or process a list of value into some specific code fragment, etc...
The existing tools allow you to get close to this, using Tool Parameter Macros $Line, $Col, $Clip however you can select some text and then move the cursor somewhere else before running the command
Why you ask! Well it would be nice to be able to apply some specific formatting to the selected text, or process a list of value into some specific code fragment, etc...
The existing tools allow you to get close to this, using Tool Parameter Macros $Line, $Col, $Clip however you can select some text and then move the cursor somewhere else before running the command