Skip to content

Instantly share code, notes, and snippets.

@icholy
Last active December 18, 2015 03:59
Show Gist options
  • Save icholy/5722450 to your computer and use it in GitHub Desktop.
Save icholy/5722450 to your computer and use it in GitHub Desktop.
I want clickable source links.
go vet |& perl -lpe '{ use Cwd 'abs_path'; s/(\/)?([^\/\0]+(\/)?)+:(\d+)/"src:\/\/" . abs_path($2) . ":" . $4/eg }'
{ "src:\\/" URLPATH "(?:\\:[[:digit:]])?", FLAVOR_AS_IS, G_REGEX_CASELESS },
subl -a "$(echo $1 | cut -c 6-)"
[Desktop Entry]
Encoding=UTF-8
Name=Source Launcher
Type=Application
Exec=src-launch "%U"
Categories=Application;Tools;
MimeType=x-scheme-handler/src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment