Support Vim's flavor of regex
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
We currently use javascript's regex library, which is unfamiliar to some coming from vim (see #2043, #3073, #3075, etc.). This ticket is to consolidate those and center discussion around the possibility of supporting Vim's regex flavor.
As a first step, I've created the Pattern class with its own parser - this essentially just translates a Vim-style regex into a JS-style regex.
Current status:
-
\</\>=>\b(technically, this is not quite right) - Deal with
\non Windows (allow leading\r) - Capture groups (
\1, etc.) - Character classes (
:help /character-classes) -
magic(#4018) -
\%V(#4936) -
\zsand\ze(#3073) - Branches (
:help /branch) - Many other weird little quirks
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 inspecting the existing Pattern class and its parser, then review the linked issues and the unchecked regex features in this ticket. Done means agreeing on and implementing the remaining Vim regex behaviors, including character classes, magic, %V, \zs/\ze, branches, and other documented quirks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100