Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there some automatic script that changes text with http:// links to references for mutt or a vim plugin ? Say I have

Text text, hey there goes a link, 
hey the second one Btw have 
you seen the ? 

I want to automatically change it to:

Text text, hey there goes a [1] link, 
hey the second one [2]. Btw have 
you seen the [1] ? 


share|improve this question
Did you search the script section of Did you try something? – romainl Feb 17 '14 at 13:30
Yes ofc I searched. I almost finished writing my own script for that. – tdi Feb 18 '14 at 10:41
up vote 3 down vote accepted

that's an interesting use case! As I already provide a set of general pattern extraction commands in my ExtractMatches plugin, as well as extended substitution commands in the PatternsOnText plugin, I was able to leverage and combine the functionality of both.

My new ExtractLinks plugin aims to provide just what you're asking for (and customizations for Markdown and HTML), in the hope that you (and others) find this useful.

This text references and
This text references [1] and [2].
share|improve this answer
wow I inspired a plugin. thanks :) – tdi Feb 22 '14 at 10:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.