I've found a plugin to preview markdown in gedit. But I am not sure if it is backdated. Is there any other better option for previewing markdown in gedit?
We can try to launch it on modern Ubuntu. For example on 16.04 LTS with Gedit 3.18.
sudo apt-get install gedit python3-markdown
cd ~/Downloads
wget https://github.com/jpfleury/gedit-markdown/archive/master.zip
unzip master.zip
cd gedit-markdown-master
./gedit-markdown.sh install
gedit
then enable plugin in the Preferences → Plugins → Markdown Preview, but it will not work because of changed API. The error here is shown below:
Traceback (most recent call last):
File "/home/user/.local/share/gedit/plugins/markdown-preview/__init__.py", line 113, in do_activate
self.addMarkdownPreviewTab()
File "/home/user/.local/share/gedit/plugins/markdown-preview/__init__.py", line 139, in addMarkdownPreviewTab
panel.add_item(self.scrolledWindow, "MarkdownPreview", _("Markdown Preview"), image)
AttributeError: 'Stack' object has no attribute 'add_item'
So I would recommend to use ReText as a replacement:
You can install it as simple sudo apt install retext. For spell check you need to install additional package with sudo apt install python3-enchant. It has two modes of operation - Live Preview and Preview.
Note: if you need to have latest version of ReText on old systems as 16.04 LTS, then you can install it from Python Packages with pip3 install ReText.
I have just hacked it to work with Pluma (fork of Gedit for MATE DE) in Ubuntu 18.04 LTS.
All you need is to install dependencies from APT and then use files from my Github repository:
sudo apt-get install pluma python-markdown gir1.2-webkit-3.0 python-configparser -y
cd ~/Downloads
wget https://github.com/N0rbert/pluma-markdown/archive/master.zip
unzip master.zip
cd pluma-markdown-master
./pluma-markdown.sh install
and it will look like:
You can move preview to the side by editing ini-file:
sed -i 's/panel = bottom/panel = side/' ~/.config/pluma/pluma-markdown.ini
Note: this solution with pluma-markdown will not work for Ubuntu 16.04 LTS (because of missed python integration for pluma). And it will not work on newer versions because of upgrade to WebKit2.
The documentation in the https://github.com/jpfleury/gedit-markdown repository has Gedit 3.10 as the highest version.
We can try to launch it on modern Ubuntu. For example on 16.04 LTS with Gedit 3.18.
then enable plugin in the Preferences → Plugins → Markdown Preview, but it will not work because of changed API. The error here is shown below:
So I would recommend to use ReText as a replacement:
You can install it as simple
sudo apt install retext
. For spell check you need to install additional package withsudo apt install python3-enchant
. It has two modes of operation - Live Preview and Preview.Note: if you need to have latest version of ReText on old systems as 16.04 LTS, then you can install it from Python Packages with
pip3 install ReText
.I have just hacked it to work with Pluma (fork of Gedit for MATE DE) in Ubuntu 18.04 LTS.
All you need is to install dependencies from APT and then use files from my Github repository:
and it will look like:
You can move preview to the side by editing ini-file:
Note: this solution with
pluma-markdown
will not work for Ubuntu 16.04 LTS (because of missed python integration for pluma). And it will not work on newer versions because of upgrade to WebKit2.