Skip to content

Instantly share code, notes, and snippets.

@jessemillar
Last active November 17, 2016 19:58
Show Gist options
  • Save jessemillar/c65130a25f93578e7f7353ac0f487beb to your computer and use it in GitHub Desktop.
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
@jessemillar
Copy link
Author

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).

@jessemillar
Copy link
Author

jessemillar commented Nov 17, 2016

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