You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2018. It is now read-only.
A small app to open special "viminiterm://" urls in a new iTerm tab in vim.
Better Errors is a RubyGem that provides, well, better errors in Rails applications during development. One feature it provides is the ability to open the files, at the offending line, in the stacktrace in your editor of choice. It does this by creating links to specially crafted URLs using custom schemes (ie. "txmt", "subl", "mvim"). I prefer to use standard CLI vim in iTerm.
To make this work, I've written a small AppleScript based application that registers a URLSchemes of "viminiterm", then activates iTerm, opens a new default session, and starts vim loading the file and line. Note that the application execs vim in the shell so once you quit vim, that iTerm session will close.
Copy the 'Vim in Iterm' application to your Applications folder.
Double click it to open it. The application needs to be run normally, just once, in order to register the URLScheme with the OS.
You can click here to
trigger the registration or manually insert the following snippet into the
browser: viminiterm://open?url=file:///etc/bashrc&line=3
Integrate with Better Errors
Create 'config/initializers/better_errors.rb' with the following contents and restart your Rails application.