Created
April 19, 2011 19:11
-
-
Save anithri/929314 to your computer and use it in GitHub Desktop.
script and commands to open txmt links in RubyMine on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gconftool-2 -s /desktop/gnome/url-handlers/txmt/command '/usr/local/bin/openInMine "%s"' --type String | |
gconftool-2 -s /desktop/gnome/url-handlers/txmt/enabled --type Boolean true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/home/scottp/.rvm/bin/rvm-auto-ruby | |
#Change the #! line to reflect the location of ruby in your environment | |
require 'uri' | |
require 'cgi' | |
my_url = CGI::parse(URI::parse(ARGV[0]).query) | |
file = URI::parse(my_url['url'][0]).path | |
line = my_url['line'][0] | |
#my mine command is located in /usr/local/bin | |
#YMMV, change following line as needed. | |
exec "mine -l #{line} #{file}" |
Version for Ubuntu 11.10 unity https://gist.github.com/1305906
gregd's version also works for Gnome Shell in 11.10. https://gist.github.com/1305906
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create the script and save. Execute the 2 commands.
Clicking on txmt links in your browser should now open RubyMine to the line number of the correct file.