Forked from HotFusionMan/BetterErrors_better_editor_setup.rb
Last active
August 29, 2015 14:23
-
-
Save gigorok/16cc2be196c14cf7dc23 to your computer and use it in GitHub Desktop.
This file contains 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
# For inclusion into a Rails config/environments/development.rb file. | |
if defined?(BetterErrors) && RUBY_PLATFORM.index('darwin') | |
url_schemes = `/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep bindings:.*:` | |
BetterErrors.editor = :macvim if url_schemes.index('mvim:') | |
BetterErrors.editor = :emacs if url_schemes.index('emacs:') | |
BetterErrors.editor = :textmate if url_schemes.index('txmt:') | |
BetterErrors.editor = :sublime if url_schemes.index('sublime:') | |
# RubyMine: | |
BetterErrors.editor = "x-mine://open?file=%{file}&line=%{line}" if url_schemes.index('x-mine:') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment