Skip to content
A coffee-mode configuration for ff-find-other-file.
Emacs Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
coffee-fof.el

README.md

coffee-fof.el

Introduction

A coffee-mode configuration for ff-find-other-file.

  • You can find the CoffeeScript or JavaScript file corresponding to this file.
  • You can find the CoffeeScrpt/JavaScript or test/spec file corresponding to this file.

Requirements

  • coffee-mode
  • js-mode, js2-mode or js3-mode

Installation

You can install coffee-fof.el from MELPA with package.el (M-x package-install coffee-fof).

Usage

coffee-find-other-file

(using C-c f) Find the CoffeeScript or JavaScript file corresponding to this file. This command is enabled in coffee-mode, js-mode, js2-mode, js3-mode.

coffee-find-test-file

(using C-c s) Find the CoffeeScript/JavaScript or test/spec file corresponding to this file. This command is enabled in coffee-mode, js-mode, js2-mode, js3-mode.

Configuration

Add the following to your Emacs init file:

(require 'coffee-fof) ;; Not necessary if using ELPA package
(coffee-fof-setup)

If the .coffee files and .js files are in the same directory, a configuration is not necessary as default value of coffee-fof-search-directories is '(".").

If the .coffee and .js files are in different directories, for example, .js files are in js directory and .coffee files are in coffee directory as below,

.
├── coffee
│   └── example.coffee
└── js
    └── example.js

customize coffee-fof-search-directories.

(custom-set-variables
 '(coffee-fof-search-directories
   '("." "../*")))

If you want to set another key binding, configure as follow.

(coffee-fof-setup :other-key "C-c C-f" :test-key "C-c t")
You can’t perform that action at this time.