How to yell at people with GitHub from TextMate

Posted by Dr Nic on May 28, 2008 and blessed with 9 comments

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. Migrating project websites to github pages with sake tasks, new websites with jekyll_generator Its almost Christmas time and that means presents. It...
  2. TextMate easter egg: find bundle commands by key combo I’ve dreamed of the ability to ask TextMate “what frigging...
  3. Using Ruby within TextMate snippets and commands I didn’t know you could run Ruby within TextMate snippets....
  4. GitHub and TextMate Unite I wanted to go from a source file to the...
  5. TextMate bundles for Merb If you are using TextMate (OS X) or E Text...
Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Glenn Wed, 28 May 2008 21:43:25 UTC

    I’ll buy two!

  2. Dr Nic Thu, 29 May 2008 08:11:44 UTC

    New version now has nice error messages.

  3. Lawrence Pit Thu, 29 May 2008 13:59:23 UTC

    Awesome.

    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 Thu, 29 May 2008 14:01:11 UTC

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

  5. Dr Nic Thu, 29 May 2008 14:22:07 UTC

    @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 Thu, 29 May 2008 15:48:01 UTC

    @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 Thu, 29 May 2008 15:56:22 UTC

    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 Thu, 29 May 2008 17:17:52 UTC

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

    http://github.com/DocSavage/rails-authorization-plugin/commit/bf4e488e5f50ff8700de557eaf24a6aed56814e3#diff-0

    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 Sun, 12 Apr 2009 21:52:29 UTC

    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.

Comments