Last active
November 17, 2016 19:58
-
-
Save jessemillar/c65130a25f93578e7f7353ac0f487beb to your computer and use it in GitHub Desktop.
Use Vim's regex engine to change direct GitHub links into GitHub wiki links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%S#\[(.*?)\]\(https://github.com/byuoitav/team/wiki/(.*?)\)#\[\[\1|\2\]\]#g |
For this to work, you need to install the eregex
Vim plugin so that Vim respects Perl regex syntax (why would you ever not use Perl syntax...?).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This takes a link like this:
[GitHub repository](https://github.com/byuoitav/team/wiki/Team-Repository-Guidelines)
And turns it into:
[[GitHub repository|Team-Repository-Guidelines]]
This link style is only useful for inter-wiki-page linking but enables automatic dead link checking (links display red on the wiki pages when they are broken).