Skip to content

Instantly share code, notes, and snippets.

@anithri
Created April 19, 2011 19:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anithri/929314 to your computer and use it in GitHub Desktop.
Save anithri/929314 to your computer and use it in GitHub Desktop.
script and commands to open txmt links in RubyMine on Ubuntu
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
#!/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}"
@anithri
Copy link
Author

anithri commented Apr 19, 2011

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.

@gregd
Copy link

gregd commented Oct 22, 2011

Version for Ubuntu 11.10 unity https://gist.github.com/1305906

@anithri
Copy link
Author

anithri commented Oct 22, 2011

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