nvim-mini / nvim-mini/mini.nvim
Add support for "surround copy (yank)" and "surround paste"
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 9.5k
- Forks
- 310
- Avg merge
- 4h 16m
- Merged PRs (30d)
- 1
Description
Contributing guidelines
- I have read CONTRIBUTING.md
- I have read CODE_OF_CONDUCT.md
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100