2017-12-15 12:00:54 +00:00
|
|
|
#+TITLE: Factor Layer
|
2018-07-10 10:57:25 +00:00
|
|
|
|
2019-05-07 08:53:56 +00:00
|
|
|
#+TAGS: general|layer|multi-paradigm|programming
|
2019-05-05 17:26:40 +00:00
|
|
|
|
2017-12-15 12:00:54 +00:00
|
|
|
[[file:img/logo.png]]
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-12-15 12:00:54 +00:00
|
|
|
- [[#description][Description]]
|
2018-01-30 14:28:13 +00:00
|
|
|
- [[#features][Features:]]
|
2017-12-15 12:00:54 +00:00
|
|
|
- [[#install][Install]]
|
2018-12-05 03:03:03 +00:00
|
|
|
- [[#key-bindings][Key bindings]]
|
2017-12-15 12:00:54 +00:00
|
|
|
- [[#factor-mode-editing-source-files][factor-mode (editing source files)]]
|
|
|
|
- [[#fuel-listener-mode][fuel-listener-mode]]
|
|
|
|
- [[#snippets][Snippets]]
|
|
|
|
|
|
|
|
* Description
|
|
|
|
A spacemacs layer for Factor language support.
|
|
|
|
|
2018-01-30 14:28:13 +00:00
|
|
|
** Features:
|
|
|
|
- Syntax Highlighting
|
|
|
|
- Factor REPL integration
|
|
|
|
- Auto-Completion in REPL
|
|
|
|
- Scaffolding support
|
|
|
|
- Refactoring support
|
|
|
|
|
2017-12-15 12:00:54 +00:00
|
|
|
* Install
|
2018-10-23 14:18:21 +00:00
|
|
|
This layer depends on the elisp files that are bundled with factor. To use this
|
2017-12-15 12:00:54 +00:00
|
|
|
layer, make sure that factor is installed and the bundled elisp files are picked
|
|
|
|
up by emacs (usually somewhere in site-lisp).
|
|
|
|
|
2018-10-23 14:18:21 +00:00
|
|
|
To use this layer, add it to your =./spacemacs= file. Add =factor= to the
|
2017-12-15 12:00:54 +00:00
|
|
|
=dotspacemacs-configuration-layers= list there.
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
* Key bindings
|
2017-12-15 12:00:54 +00:00
|
|
|
** factor-mode (editing source files)
|
|
|
|
|
2019-03-07 13:11:02 +00:00
|
|
|
| Key binding | Description |
|
|
|
|
|-------------+-----------------------------------------------------|
|
|
|
|
| ~SPC m '~ | Jump to the factor listener, start if required |
|
|
|
|
| ~SPC m c c~ | Compile and run the current file |
|
|
|
|
| | |
|
|
|
|
| ~SPC m e f~ | Evaluate definition at point |
|
|
|
|
| ~SPC m e r~ | Evaluate region |
|
|
|
|
| ~SPC m e R~ | Evaluate region extended to nearest definition |
|
|
|
|
| | |
|
|
|
|
| ~SPC m g g~ | Jump to definition of word (under point) |
|
|
|
|
| ~SPC m g a~ | Cycle between source, test, and documentation |
|
|
|
|
| | |
|
|
|
|
| ~SPC m t a~ | Run tests for current vocab |
|
|
|
|
| | |
|
|
|
|
| ~SPC m r s~ | Extract innermost sexp as separate word |
|
|
|
|
| ~SPC m r r~ | Extract region as separate word |
|
|
|
|
| ~SPC m r v~ | Create new Vocab with words in region |
|
|
|
|
| ~SPC m r i~ | Inline word |
|
|
|
|
| ~SPC m r w~ | Rename all occurences of word |
|
|
|
|
| ~SPC m r a~ | Extract region as new ARTICLE form |
|
|
|
|
| ~SPC m r g~ | Turn current definition into generic word |
|
|
|
|
| ~SPC m r u~ | Update USING: line according to actually used words |
|
|
|
|
| | |
|
|
|
|
| ~SPC m s s~ | Switch to factor listener |
|
|
|
|
| | |
|
|
|
|
| ~SPC m h h~ | Help for thing at point |
|
|
|
|
| ~SPC m h e~ | Infer stack effect for sexp/region |
|
|
|
|
| ~SPC m h p~ | Apropos |
|
|
|
|
| ~SPC m h v~ | List all words in current file/vocab |
|
|
|
|
| ~SPC m h <~ | Show calling words of current word |
|
|
|
|
| ~SPC m h >~ | Show words called by current word |
|
|
|
|
| | |
|
|
|
|
| ~SPC m S v~ | Scaffold vocab |
|
|
|
|
| ~SPC m S h~ | Scaffold help for current vocab |
|
2017-12-15 12:00:54 +00:00
|
|
|
|
|
|
|
** fuel-listener-mode
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2017-12-15 12:00:54 +00:00
|
|
|
|-------------+---------------------------|
|
|
|
|
| ~SPC m r~ | Refresh all loaded vocabs |
|
|
|
|
| ~SPC m T s~ | Toggle stack mode |
|
|
|
|
| ~SPC m h~ | Help for word at point |
|
|
|
|
| ~SPC m v~ | Edit vocab |
|
|
|
|
| ~SPC m S v~ | Scaffold vocab |
|
|
|
|
|
|
|
|
* Snippets
|
2018-01-30 14:28:00 +00:00
|
|
|
This layer provides a yasnippet for colon definitions, which can be expanded
|
2018-10-23 14:18:21 +00:00
|
|
|
after typing a single ~:~. Note that you might have
|
2017-12-15 12:00:54 +00:00
|
|
|
to set =yas-triggers-in-field= to nil if you use =x= for stack effect
|
2018-10-23 14:18:21 +00:00
|
|
|
declaration elements a lot, as this will trigger a builtin snippet from
|
2017-12-15 12:00:54 +00:00
|
|
|
prog-mode instead of advancing to the next field when pressing =<TAB>=.
|