Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dunn/homebrew-mode

Emacs minor mode for editing Homebrew formulae
https://github.com/dunn/homebrew-mode

Last synced: 2 months ago
JSON representation

Emacs minor mode for editing Homebrew formulae

Awesome Lists containing this project

README

        

# homebrew-mode

[![Melpa Status](http://melpa.org/packages/homebrew-mode-badge.svg)](http://melpa.org/#/homebrew-mode)
[![Melpa Stable Status](http://stable.melpa.org/packages/homebrew-mode-badge.svg)](http://stable.melpa.org/#/homebrew-mode)

Emacs minor mode for editing [Homebrew](http://brew.sh) formulae.

## setup

```elisp
(add-to-list 'load-path "/where/is/homebrew-mode")
(require 'homebrew-mode)
(global-homebrew-mode)
```

## keys and commands

The command prefix is C-c C-h. These are the commands currently mapped to it:

- C-c C-h f: Download the source file(s) for the formula
in the current buffer.

- C-c C-h u: Download and unpack the source file(s) for the formula
in the current buffer.

- C-c C-h i: Install the formula in the current buffer.

- C-c C-h r: Uninstall the formula in the current buffer.

- C-c C-h t: Run the test for the formula in the current buffer.

- C-c C-h a: Audit the formula in the current buffer.

- C-c C-h s: Open a new buffer running the Homebrew
Interactive Shell (`brew irb`).

- C-c C-h c: Open a dired buffer in the Homebrew cache
(default `/Library/Caches/Homebrew`).

- C-c C-h d: Add `depends_on` lines for the specified
formulae. Call with one prefix (C-u) argument to make
them build-time dependencies; call with two (C-u C-u) for
run-time.

- C-c C-h p: Insert Python `resource` blocks (requires poet,
installed with `pip install homebrew-pypi-poet`).

## custom variables

These are just the most important variables; run `M-x customize-group
RET homebrew-mode` to see the rest.

- If you’re using Linuxbrew or a non-standard prefix on Mac OS, you’ll
need to update `homebrew-prefix` to point at your `brew –-prefix`.

- If you’re using Linuxbrew or have your cache in a non-standard
location on Mac OS, update `homebrew-cache-dir`.

- If you want to turn on whitespace-mode when editing formulae that
have inline patches, set `homebrew-patch-whitespace-mode` to
`t`. It’s off by default since it looks ugly.