Add a timer between multiple-character actions, like "]]" "[[" "yy"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
In the current implementation, two consecutive ']' clicks will always trigger "next page" action, no matter how long in between these two clicks. Even there is a one-minute gap, it will always redirect to the next page. However most of time when people use these multi-character actions, they will click twice within a second, and they don't want surprises, like click "y" twice change the clipboard without any visual clue.
It will be nice to add a timeout action to the state-machine, so these accidents will not happen. Thanks!
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 by locating the state-machine implementation that handles multi-character actions such as "]]", "[[", and "yy". Trace how consecutive keypresses are retained, then define completion as a timeout that prevents delayed second clicks from triggering the action while preserving quick multi-character actions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100