]> gitweb.factorcode.org Git - factor.git/blob - misc/fuel/README
Merge commit 'origin/master'
[factor.git] / misc / fuel / README
1 FUEL, Factor's Ultimate Emacs Library
2 -------------------------------------
3
4 FUEL provides a complete environment for your Factor coding pleasure
5 inside Emacs, including source code edition and interaction with a
6 Factor listener instance running within Emacs.
7
8 FUEL was started by Jose A Ortega as an extension to Ed Cavazos'
9 original factor.el code.
10
11 Installation
12 ------------
13
14 FUEL comes bundled with Factor's distribution. The folder misc/fuel
15 contains Elisp code, and there's a fuel vocabulary in extras/fuel.
16
17 To install FUEL, either add this line to your Emacs initialisation:
18
19   (load-file "<path/to/factor/installation>/misc/fuel/fu.el")
20
21 or
22
23   (add-to-list load-path "<path/to/factor/installation>/fuel")
24   (require 'fuel)
25
26 If all you want is a major mode for editing Factor code with pretty
27 font colors and indentation, without running the factor listener
28 inside Emacs, you can use instead:
29
30   (add-to-list load-path "<path/to/factor/installation>/fuel")
31   (setq factor-mode-use-fuel nil)
32   (require 'factor-mode)
33
34 Basic usage
35 -----------
36
37 If you're using the default factor binary and images locations inside
38 the Factor's source tree, that should be enough to start using FUEL.
39 Editing any file with the extension .factor will put you in
40 factor-mode; try C-hm for a summary of available commands.
41
42 To start the listener, try M-x run-factor.
43
44 Many aspects of the environment can be customized:
45 M-x customize-group fuel will show you how many.
46
47 Quick key reference
48 -------------------
49
50 (Triple chords ending in a single letter <x> accept also C-<x> (e.g.
51 C-cC-eC-r is the same as C-cC-er)).
52
53 * In factor source files:
54
55  - C-cz : switch to listener
56  - C-co : cycle between code, tests and docs factor files
57
58  - M-. : edit word at point in Emacs
59  - M-TAB : complete word at point
60  - C-cC-ev : edit vocabulary (M-x fuel-edit-vocabulary)
61  - C-cC-ew : edit word (M-x fuel-edit-word)
62
63  - C-cr, C-cC-er : eval region
64  - C-M-r, C-cC-ee : eval region, extending it to definition boundaries
65  - C-M-x, C-cC-ex : eval definition around point
66  - C-ck, C-cC-ek : run file
67
68  - C-cC-da : toggle autodoc mode
69  - C-cC-dd : help for word at point
70  - C-cC-ds : short help word at point
71  - C-cC-de : show stack effect of current sexp (with prefix, region)
72
73  - C-cM-<, C-cC-d< : show callers of word at point
74  - C-cM->, C-cC-d> : show callees of word at point
75
76 * In the listener:
77
78  - TAB : complete word at point
79  - M-. : edit word at point in Emacs
80  - C-ca : toggle autodoc mode
81  - C-cv : edit vocabulary
82  - C-ch : help for word at point
83  - C-ck : run file
84
85 * In the debugger (it pops up upon eval/compilation errors):
86
87  - g : go to error
88  - <digit> : invoke nth restart
89  - w/e/l : invoke :warnings, :errors, :linkage
90  - q : bury buffer
91
92 * In the Help browser:
93
94  - RET : help for word at point
95  - f/b : next/previous page
96  - SPC/S-SPC : scroll up/down
97  - TAB/S-TAB : next/previous headline
98  - C-cz : switch to listener
99  - q: bury buffer
100