Code Monkey home page Code Monkey logo

github-tmbundle's Introduction

GitHub TextMate bundle

Contains the following commands specific to the current file:

  • Show in GitHub - opens the current file in github, and selects the same lines that are selected in the current file
  • Annotate/Blame/Comment Line - finds the original commit where this line was created and opens that commit in GitHub, whereby you can use the GitHub comment feature

Contains the following commands specific to the repository:

  • Show Network in GitHub - opens the "Network" view in GitHub so you can see who has interesting commits that you don't have

Contains the following commands for creating gists:

  • Create gist from selection - will create a gist using your GitHub credentials (see below). It will either use the current selection, or the whole file, using the filename and the currently active language. The URL of the gist will be copied to your clipboard.
  • Create private gist from selection - same as above, but the Gist will be private.

Prerequisites

The bundle requires Ruby, RubyGems, and the git RubyGem:

	sudo gem install git

Installation

To install via Git:

	mkdir -p ~/Library/Application\ Support/TextMate/Bundles
	cd ~/Library/Application\ Support/TextMate/Bundles
	git clone git://github.com/drnic/github-tmbundle.git "GitHub.tmbundle"
	osascript -e 'tell app "TextMate" to reload bundles'

Source can be viewed or forked via GitHub: http://github.com/drnic/github-tmbundle/tree/master

To install without Git:

	mkdir -p ~/Library/Application\ Support/TextMate/Bundles
	cd ~/Library/Application\ Support/TextMate/Bundles
	wget http://github.com/drnic/github-tmbundle/tarball/master
	tar zxf drnic-github-tmbundle*.tar.gz
	rm drnic-github-tmbundle*.tar.gz
	mv drnic-github-tmbundle* GitHub.tmbundle
	osascript -e 'tell app "TextMate" to reload bundles'

To enable Gist support, make sure you've followed the instructions on your account page for adding your GitHub user and API Token to your global Git config. You can create gists without specifying your credentials, but they won't be associated with your account.

Author

Dr Nic Williams, [email protected], http://drnicwilliams.com

With contributions from:

License

(The MIT License)

Copyright (c) 2010 Dr Nic Williams, [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

github-tmbundle's People

Contributors

4rc0s avatar drnic avatar infininight avatar jarib avatar jnewland avatar jqr avatar lsegal avatar melo avatar roidrage avatar teamon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

github-tmbundle's Issues

git: command not found

Github.tmbundle should use the TextMate TM_GIT variable to determine the path to git rather than assuming git is within $PATH.

Feature: add "comment on line in diff"

I'd love to use this to help me with my code reviews.

1: pipe the diff into TextMate:

$ git diff HEAD~5..HEAD | mate

2: select "Git -> Comment on line from diff"

3: GitHub.Bundle parses the diff file for the closest file marker above the current line and calculates an offset from there to get the line number

4: GitHub.Bundle runs git blame on the file and calculated line

  1. GitHub.Bundle generates a URL for the commit/file/line and opens it in the browser.

False is not a symbol

When I try to create a gist from my selection, I get a TypeError because "false is not a symbol".

I looked at the source and the problem is here:

Gist.send(ARGV[0] == "private")

Thanks,

Nicolás Hock

Not adding API creates orphaned private gists

Use case: I forgot to associate my API key with the Github bundle and created a private gist -- this creates a gist that belongs to no one (no account is associated) meaning it also cannot be deleted by anyone but a Github support person ;-)

I think this bundle should prevent you from doing this.

Incorrect method call (Gist.send instead of Gist.write)

What I did:
Made "Gist from selection" in TextMate with latest (37fe3f2) version of bundle.

What I've expected:
Pasting selected text/all text if none selected on github.

What I got:
Error saying "send: not a symbol (false). TypeError".

How to fix:
In the latest commit (37fe3f2) Gist.send was renamed to Gist.write in Support/lib/gist.rb, but this change was not applied to places, where this method was actually called (Support/bin/create_gist_from_selection.rb, Support/bin/send_multifile_gist.rb).

It is also partially fixed in joshua's fork (http://github.com/joshua/github-tmbundle/commit/3eeeeaee95124b19190d9903ce9935d8e7ca3286).

Renaming of context menu items related to multifile gist

I had a project with a few files open in textmate and I tried sending all of them to a gist by using send multifile gist. It wasn't obvious to me until I read through the source code that the add to multifile gist command should have been used beforehand.

I suggest renaming the context menu items in the following way:

    Send multifile Gist => Send added files to multifile Gist
    Send private multifile Gist => Send added files to private multifile Gist

Or just color me ignorant :)

URL not copying to clipboard

Not sure why this is happening, but I have RVM and Ruby 1.9.2 . Latest branch installed of github-tmbundle, and the URL never actually copies to the clipboard... not sure whats up, hoping you can tell me where to look...

Report activate error

I keep getting a
"/system/library/frameworks/ruby.framework/Versions1.8/usr/lib/ruby/1.8/rubygems.rb:777:in 'report_activate_error': Could not find rubygem git (>=1.0.0) (Gem::LoadError)..." every time I try to use "show in github." I have installed the github gem and everything is up to date. I am also running Lion with rails 1.9.2. Error: https://img.skitch.com/20111115-c57x282w4xmgx8bxrd9tdws12x.jpg

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.