0.0
No commit activity in last 3 years
No release in over 3 years
A configurable utility for jumping across files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

active_support
>= 0
pow
>= 0
>= 0
 Project Readme

SwitchFile

SwitchFile is a simple gem for opening a file related to a currently open file.

Usage

  1. Install SwitchFile

    gem install switch_file

  2. Add a .switch_file to your project root directory. A .switch_file is a plain ruby file containing an array of hashes. Each hash represents a file type. A file type has the following attributes:

    • name - name of the file type
    • shortcut - a short, unique key for the file type
    • path_generator - a ruby block that will determine the path of the matching file type of a class name
    • path_regex - a regex that determines if a file path matches the file type
    • command - the editor that will open the file

    You can find sample SwitchFile configuration files at the examples.

  3. Configure your editor to launch switch_file based on the current file. With geany,

  4. Go to Build/Set Build Commands.

  5. Change the execute command to switch_file --path %d/%f.

  6. Running Build/Execute will now launch switch_file based on the currently open file.