charliesome/better_errors — pull request #34 by jdelStrother (2012-12-11 13:45:39+00:00)
Title: Add links to open files in the user's editor

Hi - this commit replaces the file name (at the top of the trace_info panel) with a link that will open the file in the user's editor. It defaults to opening links in textmate using the txmt handler, but you could override it in an initializer using something like :

```ruby
if defined?(BetterErrors)
BetterErrors.editor = Proc.new{|file, line| "mvim://open/?url=file://#{URI.escape file}&line=#{line}"}
end
```

Possible improvements might be to try & guess the appropriate url based on the user's $EDITOR var, but maybe this is good enough for now. I'd also wondered about changing the filenames in the left-hand stacktrace column into links, but it does then make it a bit more difficult to click on a particular frame.

What do you think?