2019-02-16 16:03:25 +00:00
#+TITLE : prolog layer
2019-05-07 08:21:07 +00:00
#+TAGS : dsl|layer|programming
2019-05-05 17:26:40 +00:00
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2019-02-16 16:03:25 +00:00
- [[#description ][Description ]]
- [[#features ][Features: ]]
- [[#install ][Install ]]
- [[#key-bindings ][Key bindings ]]
- [[#consulting ][Consulting ]]
- [[#compiling ][Compiling ]]
- [[#formatting ][Formatting ]]
- [[#inserting ][Inserting ]]
- [[#help ][Help ]]
- [[#evaluating ][Evaluating ]]
* Description
This layer adds support for Prolog using the bundled Prolog mode for Emacs. In addition it also adds ediprolog support for better interaction with SWI-Prolog.
** Features:
2019-04-18 19:16:31 +00:00
- Designed for SWI-Prolog as a default, but can be used with other Prologs that Prolog mode supports.
- Interactive consulting and compiling.
- Auto-formatting.
- Apropos and help lookup.
2019-02-16 16:03:25 +00:00
* Install
To use this configuration layer, add it to your =~/.spacemacs= . You will need to
add =prolog= to the existing =dotspacemacs-configuration-layers= list in this
file.
* Key bindings
** Consulting
2019-04-18 19:16:31 +00:00
| Key binding | Description |
2019-02-16 16:03:25 +00:00
|-------------+-------------------|
| ~SPC m s b~ | Consult Buffer |
| ~SPC m s f~ | Consult File |
| ~SPC m s p~ | Consult Predicate |
| ~SPC m s r~ | Consult Region |
** Compiling
2019-04-18 19:16:31 +00:00
| Key binding | Description |
2019-02-16 16:03:25 +00:00
|-------------+-------------------|
| ~SPC m c b~ | Compile Buffer |
| ~SPC m c c~ | Compile File |
| ~SPC m c p~ | Compile Predicate |
| ~SPC m c r~ | Compile Region |
2019-04-18 19:16:31 +00:00
** Formatting
2019-02-16 16:03:25 +00:00
2019-04-18 19:16:31 +00:00
| Key binding | Description |
2019-02-16 16:03:25 +00:00
|-------------+---------------|
| ~SPC m =~ | Indent Buffer |
** Inserting
2019-04-18 19:16:31 +00:00
| Key binding | Description |
2019-02-16 16:03:25 +00:00
|-------------+----------------------------------------------------|
| ~SPC m i m~ | Insert a Modeline for Module Specification |
| ~SPC m i n~ | Insert Newline and the Name for the Current Clause |
| ~SPC m i p~ | Insert Predicate Template for the Current Clause |
| ~SPC m i s~ | Insert Predicate Spec |
** Help
2019-04-18 19:16:31 +00:00
| Key binding | Description |
2019-02-16 16:03:25 +00:00
|-------------+---------------------------------------|
| ~SPC m h a~ | Prolog Apropos for a Given String |
| ~SPC m h p~ | Online Help for the Atom under Cursor |
2019-04-18 19:16:31 +00:00
** Evaluating
2019-02-16 16:03:25 +00:00
2019-04-18 19:16:31 +00:00
| Key binding | Description |
2019-02-16 16:03:25 +00:00
|-------------+-------------------------------------------|
| ~SPC m e e~ | Context Sensitive SWI-Prolog Interaction. |