VSCodeVim / VSCodeVim/Vim

surround with easymotion actions

Open
#8,612 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
When using Vim with tpope/vim-surround and timsu92/vim-easymotion installed, we can type ys<leader><leader>e to surround from current cursor to the target returned by Easymotion.

For example, we have this in our code (| means the cursor):

const str = |A sentence with multiple words;

I want the function which I can press ys to activate tpope/vim-surround and <leader><leader>e to use Easymotion to select the surround range to the end of words and surround with double quotes.

The result would be:

const str = "A sentence with multiple words";

Describe the solution you'd like
Currently, from the statusline, I see ys and then the letters got cleared after pressing <leader>.
I hope we can surround with any of the motions provided by Easymotion🤩

Describe alternatives you've considered
Currently, we can enter visual mode and run Easymotion to select the range first, and then press S to surround.

Additional context
No

Contributor guide

Open the contributing guide

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.

Research direction

No source file or test is named. Reproduce the ys, leader-leader-e sequence in VS Code with tpope/vim-surround and timsu92/vim-easymotion installed, then compare it with the documented visual-mode and S workflow. Done means an Easymotion target can provide the surround range without the statusline sequence being cleared.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.