arjunmahishi / arjunmahishi/flow.nvim
Capture the selected text as a variable in custom commands
- Dominant language
- Lua
- Stars
- 120
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
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 `:! ` 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
```bash
echo $selected_text | sort | uniq -c | sort -nr
```
```bash
curl -XPOST HTTP://localhost:8080 --data $selected_text
```
```bash
echo $selected_text > /tmp/save-to-file
```
Contributor guide
No contributing guide indexed for this repository
Research direction
No implementation files or tests are named. Start by locating the custom-command entry point and the code that invokes shell commands, then trace how the selected text is obtained. Done means custom commands can access the selected text as $selected_text without modifying the buffer, with the examples serving as usage checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, shell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100