Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture the selected text as a variable in custom commands #27

Open
arjunmahishi opened this issue Feb 18, 2024 · 0 comments
Open

Capture the selected text as a variable in custom commands #27

arjunmahishi opened this issue Feb 18, 2024 · 0 comments
Labels

Comments

@arjunmahishi
Copy link
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant