Skip to content

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

@arjunmahishi

Description

@arjunmahishi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions