Last Updated: February 25, 2016
·
649
· reaktivo

Quick Open Files

I wrote a tiny script to open each file matching by name under the current directory in Sublime Text. I named it rsubl and put it in my PATH.

subl `find . -name "*$1*"`

I find it specially useful when working with Git and apps with large directory trees like RoR. If you're at your app root and want to open your home_controller.rb file under app/controllers/, you can do it with the following command:

rsubl home_control

Or if you want to open all your controllers:

rsubl _controller

Pretty neat, isn't it?