VSCodeVim / VSCodeVim/Vim

Add "sneak-clever-s" mode to vim-sneak emulation

Open
#6,956 0 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

From vim-sneak's documentation:

                                                        *sneak-clever-s*
Similar to clever-f[3], immediately after invoking Sneak you can move to the
next match by hitting `s` (or `S`) again. If you instead move the cursor or do
something else, then `s` starts a new Sneak. In that case, you can repeat the
most recent Sneak search by pressing "s<Enter>" (or whatever key, if any, you
mapped to <Plug>Sneak_;). To enable "clever s": >
    let g:sneak#s_next = 1
<
Sneak adds to the |jumplist| only on the initial invocation; so after moving
around with ; and , (or s/S) you can easily go back via |CTRL-O| or |``|.
    - Repeat invocations (;/,) do not add to the jumplist.
    - Consecutive invocations ("s" immediately after s/S/;/,)
      do not add to the jumplist.

s<Enter> ("s" followed by Enter) always repeats the last search, even if |;|
and |,| were reset by |f| or |t|. This is especially useful for re-invoking
|sneak-label-mode| (because |;| and |,| never invoke label-mode).

I'd love to have this feature come to vim-sneak's emulation in VSCode.

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 implementation files or tests are named. Start by reading the linked vim-sneak documentation and locating the existing Sneak emulation and related tests in the TypeScript VS Code Vim extension; done means matching the described clever-s behavior, repeat handling, and jumplist rules.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.