This is a little how-to for using the reStructuredText plugin inside gedit.
- Python: version >= 3.3 (-> use mcepl/reStPlugin for Python 2.x)
- Pygments: take the latest version
- reStructuredText
- odtwriter: a reStructuredText addon to export in LibreOffice format
- Put
reST.plugin
file in gedit's plugins directory. The standard one should be~/.local/share/gedit/plugins/
. Alternatively, the global directory is something like/usr/lib/i386-linux-gnu/gedit/plugins/
. - Copy the whole
reST
folder into the same directory.
You should then obtain something like this: :
.../plugins/
reST.plugin
reST/
__init__.py
makeTable.py
etc.
- Follow the instructions in syntax/README.rst to activate syntax highlighting.
Activate the plugin via Edit / Preferences / Plugins and check the checkbox next to reStructuredText Preview
.
The plugin is now activated, and you should have a new panel inside the bottom pane named reStructuredText Preview
. If you don't see the panel on the bottom of the editor window make it visible via View / Bottom Panel.
There's only one shortcut for the moment: Ctrl+Shift+R
Ctrl+Shift+R
is used to refresh the generated HTML view inside reStructuredText Preview
pane. If there's some selected text, the conversion will only process the selected portion of the text. If there's no selection, the entire document is processed. This may be useful for trouble shooting.
The Tools
menu is populated with several options:
reStructuredText Preview
refreshes the preview pane (same as above)Create table
is useful for creating simple reStructuredText tables
Example: Enter the two folling lines in gedit, select them and activate Create table
: :
one,two,tree
First,Second,Third
The output will be:
one | two | tree |
---|---|---|
|
|
|
Paste Code
maybe useful to paste some parts of code using Pygments'ssourcecode
directive. Just invokePaste Code
with something in your clipboard and you're done. You'll have to adjust the language afterwards.--> HTML
,--> LaTeX
,--> LibreOffice
: are convenient ways to export your reStructuredText docs to the given formats with custom * stylesheets. If you're not happy with the formatting go ahead and modify the stylesheets!