mattn / mattn/vim-textobj-url

[Suggestion] Match all protocols

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
25
Forks
5
PR merge metrics
No merged PRs in 30d

Description

So current pattern will only match https, http and ftp

https://github.com/mattn/vim-textobj-url/blob/782d5b990caaa4519d5b4f39ca9ec48bd2e4bfc5/autoload/textobj/url.vim#L2

Can we match more protocols like socks5, tcp, sdns, ssh and so on?

Maybe we can use this:

let l:mx = '[a-z0-9]+://'

Contributor guide

No contributing guide indexed for this repository

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

Start at autoload/textobj/url.vim line 2, which currently limits matching to http, https, and ftp. Check how the pattern is used, then broaden protocol matching as proposed and verify that URLs with the requested protocols are recognized without breaking existing matches.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.