spacemacs/layers/+lang/rest
syl20bnr 56377cf1b3 Rename ReST layer to restructuredtext and clean up layer
rest can be confusing since there is already a restclient layer.
2017-02-02 09:37:34 -05:00
..
README.org Rename ReST layer to restructuredtext and clean up layer 2017-02-02 09:37:34 -05:00

reStructuredText layer

/TakeV/spacemacs/media/commit/d97143be08bbe71b8c5ce650aa2f239bfdbc904d/layers/+lang/rest/img/restructuredtext.png

Description

The layer adds ReStructuredText (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 support.

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add restructuredtext to the existing dotspacemacs-configuration-layers list in this file.

Configuration

Sphinx target

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))
            ))

Web browser

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

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