spacemacs/layers/+lang/rest/README.org
2017-02-02 09:09:31 -05:00

2.1 KiB

rest layer

logo

/TakeV/spacemacs/media/commit/9399de0ddc49aa8394fc55342156df9743ea237b/layers/+lang/rest/img/rest.png

Description

The layer adds ReST support to Spacemacs and adds some functions to rst-mode.

Features

  • rst files are supported via Emacs built-in rst.el.
  • Lists are inserted by new functions.
  • Directives can be inserted easily.
  • Sphinx is supported.

Install

To use this contribution add it to your ~/.spacemacs

  (setq-default dotspacemacs-configuration-layers '(rest))

Configuration

To use the layer's Sphinx feature, the following variables should be set.

A parent directory is needed for all Sphinx projects' builds.

    (setq rst-sphinx-target-parent "/your/path/of/build/")

Set a directory in the parent directory for each Sphinx project.

    (setq rst-sphinx-target-projects
          '(("project1" . (latex "folder/in/target/parent" t))
            ("project2" . (html  "folder/in/target/parent" nil))
            ))

Set the browser for viewing the HTML page of current rst file. This one is optional. If not set, the default browser will be used.

    (setq rst-slides-program "chromium")

Key bindings

Normal state

Key Binding Description
<SPC> m c compile projects
<SPC> m f open compiled HTML page of current page

Hybrid state

Key Binding Description
S-RET insert bullet lists
C-0 S-RET insert lists, choose list type first
C-c C-d insert directives
C-c C-o add an option to current directive