14

I'm just learning Sphinx, and I need to edit ReST files. Is there an intelligent editor for it? Like, an editor that gives me code coloration, easy indentation, code completion (hopefully), etc.

Chris Morgan
  • 86,207
  • 24
  • 208
  • 215
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
  • what kind of code completion would you be looking for? I'm in the process of writing a vim plugin for restructured text, so I'd def be interested in that. – Jeff Tratner May 18 '12 at 00:38

9 Answers9

6

vi is very good at this. I was just editing some .rst files right now and it colors the headings, monospaced text, etc. The macros let you very quickly turn text into headings and whatnot.

dd.
  • 922
  • 1
  • 7
  • 17
6

Emacs with rst-mode: http://docutils.sourceforge.net/docs/user/emacs.html

Matti Pastell
  • 9,135
  • 3
  • 37
  • 44
  • 1
    Very rich RST support. Daily in use. Highly recommend! +1 – gavenkoa Feb 12 '13 at 20:51
  • 1
    rst-mode needs table-mode, to edit tables. But it is very slow, so that one can see a lag when inserting characters. It knows only tables made with `+` and `-`, but not `=` which is available in spinx too. – Jonas Stein Jun 15 '14 at 11:28
2

eclipse has an editor that provides all these features:

http://marketplace.eclipse.org/content/rest-editor

also

http://resteditor.sourceforge.net/

BarryPye
  • 1,975
  • 2
  • 18
  • 19
2

Leo does some of this.

More info from Creating Documents with Leo :

  1. "View nodes can show you many different views of your writing simultaneously..."
  2. "... The rst3 command converts an @rst tree to rST and then sends this text to docutils or Sphinx for further processing."
  3. "... automatically creates rST sections from headlines"

There are additional features mentioned later in the documentation.

belacqua
  • 543
  • 4
  • 18
Chris Dennett
  • 22,412
  • 8
  • 58
  • 84
2

Gedit has a ReST plugin which supports syntax highlighting, keyboard shortcuts ("snippets"), and HTML preview.

flexiondotorg
  • 341
  • 3
  • 2
2

There is also a rst mode for the Jed editor: http://jedmodes.sf.net/mode/rst/

1

jEdit also has ReST highlighting, but no ReST specific auto-completion features (it does support macros though).

I would opt for vim or Cream, personally.

Matt Garrison
  • 539
  • 3
  • 11
1

I use vim and have some useful mappings in my .vimrc:

nnoremap <leader>1 yypVr=
nnoremap <leader>2 yypVr- 
nnoremap <leader>3 yypVr'
nnoremap <leader>4 yypVr`
vmap <silent> <leader>b :call BulletList()<cr>

" Bullet List
function! BulletList()
  let lineno = line(".")
  call setline(lineno, "* " . getline(lineno))
endfunction

And often create vim macros on th fly depending on the file I have to restructure

eolo999
  • 863
  • 6
  • 13
1

A while ago I tried the Atom Editor https://atom.io/. It has the benefits of even displaying a preview showing possible images and renders the sections correctly, even formulas are displayed. The syntax highlighting is supported, but there is not much to highlight in ReST anyway.

In order to make it work you have to install pandoc and the atom packages language-restructuredtext and rst-preview-pandoc. You activate the preview with CTRL-SHIFT-E.

Another possibility is Visual Studio Code, which I didn't tried.

But after a while I'm relying on simple NotePad++, as there is not so much benefit in an nice editor, as ReST is already so simple.

Aleph0
  • 5,816
  • 4
  • 29
  • 80