flow.nvim
flow.nvim copied to clipboard
Capture the selected text as a variable in custom commands
If the selected text is available as a variable in custom commands, this will allow the user to pass that as input to their script via STDIN or use it in any way they want. This will be very helpful.
This will be very similar to how using :! <cmd>
works in the command window. But this will not modify the buffer. Maybe in the future, this plugin can also support modifying the buffer based on the output of the custom command.
Examples
echo $selected_text | sort | uniq -c | sort -nr
curl -XPOST HTTP://localhost:8080 --data $selected_text
echo $selected_text > /tmp/save-to-file