VSCodeVim / VSCodeVim/Vim

clip-history extension support

Open
#4,005 4 comments 20 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/not-vim-core kind/feature
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

What is Clip-history?

Clip-history (also know as a yank-ring or kill-ring) is a feature that creates a small buffer of recently yanked, or copied, text. The buffer is then accessed with repeated presses of paste (or cmd+v), which cycle through the ring in a last-in, first-out manner, looping back to the first instance after viewing all entries in the buffer.

What does this solve?

Remembering and accessing paste buffers is a common pain-point in the vanilla vim experience. It has been addressed in vim with yank-ring, and in Atom's Vim-mode-plus with the excellent clip-history.

A relatable experience to many is needed to replace text within parenthesis with text previously outside. In vanilla vim yanking the desired text, then deleting the inner parenthesis text will replace the desired text in the default buffer. Ex:

function(props) {
    const ret = props.toggle ? 'why allocate' : 'here?'
    return(ret)
}

D on "props.tog...", followed by cib on "ret" will mean you have to specify the paste buffer, rather than just cycle through quickly with two presses of p.

Comments

While the above is a MWE, it's not uncommon to need to paste something a few deletions/changes back. Cycling through paste is highly visual and quick, offer more feedback than pasting from buffers. It's a great feature and I hope you guys think it's worthy of inclusion!

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

The issue provides no files, tests, or entry points to start from. First locate the TypeScript extension's existing paste and keybinding handling, then define the expected clip-history behavior and how it interacts with Vim registers. Done means the requested history can be cycled through paste actions with coverage for the described workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.