Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add support for "surround copy (yank)" and "surround paste"

Open
#1,325 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
lua, neovim
Domain
tooling

Research direction

Start with the mini.surround module and the implementation shown in the linked comparison branch. Check how the reported syf and spiw examples should behave, then determine the module’s expected completion criteria from that proposal. Done means the surround can be copied from one text region and pasted onto another, including complex surrounds such as f.

Written by the indexing model from the issue text.

Description

feature-request mini.surround
Contributing guidelines
Module(s)

mini.surround

Description

I was playing with my mini.surround config the other day, and I realized that occasionally I want to "copy" a surround, particularly complex ones like "f", and "paste" the same text in another piece of code.

Thinking about it conceptually, executing a command such as "syf" over a function call like vim.print(my_variable), so it would internally store { left = "vim.print(", right = ")" }. Then it should be possible to execute spiw over my_other_variable to get vim.print(my_other_variable).

I it a go in implement this feature, and it was easier to implement than I anticipated. If there's interest, I can format it and open a proper pull request.

Dominant language
Lua
Stars
9.6k
Forks
314
Avg merge
19h 10m
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-mini/mini.nvim

All issues in nvim-mini/mini.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.