Skip to content

Mapping for Remote Yank of Quoted Text #2

Description

@paroxyzm

Hello!

I'm excited about the plugin and have a feature request that might be useful for users who work with various text objects. The idea is to create a mapping that does the following:

  • Search Operation: It would search for all occurrences of quotes—whether single quotes, double quotes, or back-ticks—in both the current and remote buffers.
  • Target Narrowing & Yank: Once the targets are identified, the mapping would narrow down the selection based on the content inside the quotes (ignoring empty quotes) and automatically yank the inner text. (So, contrary to current status-quo, where the user has to provide text-object)

For example, a mapping might be defined like:

vim.keymap.set("n", "<C-y>", "???" { noremap = true, silent = true })

The expectation is that with a single keybind, the user could perform a remote yank of text within quotes. Similar mappings could later be defined for other text objects, such as brackets or function arguments, etc...

Question:
Is it possible to implement such a functionality within the current plugin framework? I’d appreciate any insights or suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions