Something I've found useful in other editors is the ability to:
- take the selected text
- run an external command and pass the selection to its
- take the external commands
stdoutand replace the current selection with it.
This way you can write useful text tools which operate on the selection using any language that can do basic io.
How can this be done with emacs using the selection? ... a single character, word, paragraph... etc.
(Directly in the command line, or via a key binding?)
The reason I'm asking this question is because I would like to operate on the selection. (i.e., the text that would be removed if
x was pressed).
!sort for example only works on a line-level.