Dr Nic

How to yell at people with GitHub from TextMate

Sometimes when you are perusing code you ask the question: why the hell is that there? or why does this even work?

Now you can instantly navigate from that erroneous line to the git commit where it was added, and then using github’s commenting system add a full-flavoured remark about that person’s code. I’m not sure if profanity is against the GitHub Terms of Service, but I’d rather ask forgiveness than permission.

TextMate + GitHub – how to comment/discuss on a line via GitHub from Dr Nic on Vimeo.

Download and installation instructions are available in all good bookstores.

Just for TextMate?

There is an editor for Windows – E-TextEditor – that was designed to support TextMate bundles. So far, the GitHub bundle doesn’t use any special features of TextMate’s latest-and-greatest UI libraries, so it should be usable on E-TextEditor.

Also, a VIM project has been created to port the GitHub bundle, by Christoph Blank. Cristoph can be found hanging around #hobo on irc as ‘solars’, if you want more goodies in the VIM bundle.

Related posts:

  1. Packaging TextMate bundles in OS X DMGs Last week Engine Yard released a CLI for their Engine...
  2. Validate and Save your Ruby in TextMate – with secret Rubinus superpowers In some TextMate bundles, if you save a file it...
  3. Migrating project websites to github pages with sake tasks, new websites with jekyll_generator Its almost Christmas time and that means presents. It...
  4. TextMate easter egg: find bundle commands by key combo I’ve dreamed of the ability to ask TextMate “what frigging...
  5. Using Ruby within TextMate snippets and commands I didn’t know you could run Ruby within TextMate snippets....

9 Responses to “How to yell at people with GitHub from TextMate”

  1. Glenn says:

    I’ll buy two!

  2. Dr Nic says:

    New version now has nice error messages.

  3. Lawrence Pit says:


    Sometimes it doesn’t determine the correct URL though (specifically the commit id) when trying to Annotate/Blame/Comment, which may result in landing on an unexpected page or even getting the 404 page.

  4. Lawrence Pit says:

    Feature request: can I get a notification in textmate when a comment is posted to me? ;-)

  5. Dr Nic says:

    @lawrence – do you have an example error case I can look at? github repo + file + line number?

    More interactivity with github as a messaging center would be awesome; though I think I’ll probably wait til there is more API assistance. Otherwise you’re polling all commits to see if a message was posted, I guess.

  6. Lawrence Pit says:

    @drnic — sure:

    git clone git://github.com/DocSavage/rails-authorization-plugin.git

    open in mate, go to identity.rb, put your cursor on line 102, CTRL-OPTION-CMD-G, option 2 works fine. Put your cursor on line 103 and it will show a 404. On line 104 it will show an unexpected page.

  7. Dr Nic says:

    The issue with line 104 is a known issue – I’m just matching the exact string, and not caring about line numbers.

    Re: line 103 – this goes to the correct commit for me. (same as for line 102′s commit)

    Interesting: line 1 – this goes to the correct commit, but wrong file so I might be pulling file names out of the diff_parent incorrectly (prob to do with files being deleted in that commit).

    I’ve been told that I could reproduce the commit search with the “git blame” command; I might try to use that as its no doubt better than my algorithm.

  8. Lawrence Pit says:

    Re: line 103, very strange, for me it ends up at:


    that commit id doesn’t exist within that project. I checked it out freshly in a different dir, and then line 103 works fine indeed.

  9. seslichat says:

    I’ve been told that I could reproduce the commit search with the “git blame” command; I might try to use that as its no doubt better than my algorithm.