Coder Social home page Coder Social logo

sphinx-mode's Introduction

sphinx-mode

Minor mode providing sphinx support.

Usage

In your rst-mode buffer call M-x sphinx-mode to add all the extra features.

Features

  • Add fontification support
  • Add support for insertion of labels
  • Add support for insertion of references (:ref:) (with a menu of available labels)
  • Add support for jumping to a label/reference
  • Add footnote ([#note]) support
  • Add reference ([ref]) support

Native code-block fontification

Similar to org-mode, we provide native emacs fontification of code blocks, which can be tweaked by changing sphinx-code-block-face.

fontification

Compile and view Sphinx projects

In rst-mode, rst-compile prompts you to run rst2html, but Sphinx projects should be compiled by running make in the project directory.

sphinx-compile (C-c C-x C-c) locates the directory containing the Makefile and runs make $FORMAT, prompting you for a $FORMAT in the minibuffer (default html).

sphinx-compile-and-view (C-c C-x C-v) runs sphinx-compile, then opens with xdg-open the compiled version of the source file being visited by the current buffer.

sphinx-mode's People

Contributors

fuco1 avatar jesse-michael-han avatar wbolster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sphinx-mode's Issues

sphinx-mode does not depend on f on melpa

Somehow sphinx-mode does not depend on f on melpa, although appears to be included in the Cask file. However it also includes dash as a dependency, which is also not visible on melpa.

This currently results in an error when sphinx-mode is started.

It is however easy to work around that: just install f and dash manually.

highlight code blocks that don't use the code-block directive

restructuredtext has concise code blocks using ::.

This:

Example:

.. code-block::

  {"oh": "hi"}

is equivalent to:

Example::

  {"oh": "hi"}

Without preceding text, it looks like this:

::

  {"oh": "hi"}

it would be nice if this package would also fontify those blocks. it would need some "default" language (python in sphinx).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.