aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/sphinx/README.rst
diff options
context:
space:
mode:
authorGravatar Clément Pit-Claudel <clement.pitclaudel@live.com>2018-04-30 00:32:00 -0400
committerGravatar Clément Pit-Claudel <clement.pitclaudel@live.com>2018-05-15 12:05:44 -0400
commitdc5b6e15a2db658fb36754608683b10f847b3e94 (patch)
treeda11af42a9af1dfddc200d1dd1dacc7fb3f30545 /doc/sphinx/README.rst
parent6f3a8a90514669c84be4de5726fe65f15141ca4d (diff)
[doc] Add an ELisp snippet to insert Sphinx roles and quotes
Diffstat (limited to 'doc/sphinx/README.rst')
-rw-r--r--doc/sphinx/README.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/sphinx/README.rst b/doc/sphinx/README.rst
index 5dcefda4f..b22c5086c 100644
--- a/doc/sphinx/README.rst
+++ b/doc/sphinx/README.rst
@@ -286,3 +286,13 @@ In addition to the objects and directives above, the ``coqrst`` Sphinx plugin de
`production list
<http://www.sphinx-doc.org/en/stable/markup/para.html#directive-productionlist>`_
and reference its tokens using ``:token:`…```.
+
+Tips and tricks
+===============
+
+The ``dev/tools/coqdev.el`` folder contains a convenient Emacs function to quickly insert Sphinx roles and quotes. It takes a single character (one of ``gntm:```), and inserts one of `:g:`, `:n:`, `:t:`, or an arbitrary role, or double quotes. You can also select a region of text, and wrap it in single or double backticks using that function.
+
+Use the following snippet to bind it to :kbd:`F12` in ``rst-mode``::
+
+ (with-eval-after-load 'rst
+ (define-key rst-mode-map (kbd "<f12>") #'coqdev-sphinx-rst-coq-action))