{"id":31,"date":"2024-10-18T15:15:28","date_gmt":"2024-10-18T13:15:28","guid":{"rendered":"https:\/\/linuxundich.de\/en\/?p=31"},"modified":"2026-10-03T16:58:16","modified_gmt":"2026-10-03T14:58:16","slug":"kate-as-a-markdown-editor-with-live-preview","status":"publish","type":"post","link":"https:\/\/linuxundich.de\/en\/gnu-linux\/kate-as-a-markdown-editor-with-live-preview\/","title":{"rendered":"Kate as a Markdown editor with live preview"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Over the years, I&#8217;ve come to know and love Markdown more and more. You can write documents in no time and then convert them into all kinds of formats with tools like Pandoc or <a href=\"https:\/\/fletcherpenney.net\/multimarkdown\/\">MultiMarkdown<\/a>. Sure, you can work on Markdown files with any editor you like, it&#8217;s all just text, but a live preview is pretty nice. You see right away where something is off, and in my opinion you also get a better overview.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On GNOME, I&#8217;m very happy with <a href=\"https:\/\/gitlab.gnome.org\/World\/apostrophe\">Apostrophe<\/a>. The app is built on the current GNOME toolkits, fits into the desktop perfectly, and is still under active development. The revised version 3.2 was released just a few weeks ago. Only on KDE was I not particularly happy with the tools on offer. On my machine, for example, <a href=\"https:\/\/ghostwriter.kde.org\/de\/\">Ghostwriter<\/a> crashes without a word and a memory error as soon as I type a single letter. Of course, nobody stops me from using Apostrophe on KDE too, but if I&#8217;m running KDE, I want to do it properly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enabling the Markdown live preview in Kate<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A quick search for current, modern alternatives to Ghostwriter turned up nothing. But why search for long when KDE already ships with Kate, a very capable editor? In a default installation, Kate doesn&#8217;t offer the feature I wanted, but you can add it afterwards. As is unfortunately common with KDE, you don&#8217;t stumble across it by accident. The first thing you need is <a href=\"https:\/\/apps.kde.org\/de\/markdownpart\/\">markdownpart<\/a>, aka the Markdown Viewer KPart, which is the matching module for KParts, the component framework behind KDE&#8217;s editor. You can install it from the package manager on all the common Linux distributions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">### Arch Linux oder Manjaro:<br>$ <strong>sudo pacman -S markdownpart<\/strong><br>### Debian, Ubuntu und Co.:<br>$ <strong>sudo apt install markdownpart<\/strong><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then start Kate and enable <em>Document Preview<\/em> under <em>Settings<\/em> | <em>Configure Kate<\/em> | <em>Plugins<\/em> [CHECK: German UI says &#8220;Module&#8221;]. After that, open <em>System Settings<\/em> for the whole desktop from the application menu. Now you have to fight your way through the configuration jungle: <em>Default Applications<\/em> | <em>File Associations<\/em> | <em>Known Types: text\/markdown<\/em> | <em>Embedding<\/em>. Click <em>Add<\/em> there and choose <em>Markdown Part (markdownpart)<\/em> [CHECK]. A click on <em>OK<\/em> activates the module. Finally, move it all the way to the top of the list.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac17726e82d4&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac17726e82d4\" class=\"wp-block-image wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2024\/10\/kate-markdown-preview1-1280x800.webp\" alt=\"The document preview has to be enabled in Kate's settings.\" style=\"width:100%\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">To let Kate show Markdown files in a preview, you need to enable the matching plugin in the settings. Without this option, the preview pane stays empty.<\/figcaption><\/figure>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac17726e87f6&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac17726e87f6\" class=\"wp-block-image wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2024\/10\/kate-markdown-preview2-1280x800.webp\" alt=\"You enable the Markdown component in KDE's System Settings.\" style=\"width:100%\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">The Markdown component is hooked in under file associations in the KDE System Settings. It makes sure Kate can display Markdown files with a preview correctly.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s the configuration done. Restart Kate once and create a Markdown text, or simply open a Markdown file. On the right edge of Kate you&#8217;ll now find an additional icon bar with a document and magnifying glass symbol. Click it to enable the preview. For Kate to update the preview automatically while you type, there&#8217;s one really, truly, absolutely final step: tap the play button.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6ac17726e8da2&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6ac17726e8da2\" class=\"wp-block-image wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/linuxundich.de\/wp-content\/uploads\/2024\/10\/kate-markdown-preview3-1280x800.webp\" alt=\"Finally, you enable the preview in KDE. The play button makes the preview update automatically.\" style=\"width:100%\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Once everything is set up correctly, Kate shows a live preview of your Markdown documents. The play button updates it automatically with every keystroke, which is very handy.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Kate offers a live preview for Markdown documents. As is typical for KDE, though, the feature is hidden away in the almost endless depths of the settings, and you also need a few additional packages from your package manager.<\/p>\n","protected":false},"author":2,"featured_media":30,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"lui_source_id":42366,"lui_source_hash":"7b67d159f60cffe126e821029fadd3fa59fd89bf5c4c14326a47f440a8ee6ea5","lui_source_translated":"2026-10-03","lui_source_reviewed":true,"lui_via_url":"","lui_via_label":"","lui_source_url":"","lui_source_label":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gnu-linux"],"_links":{"self":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":1,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/posts\/31\/revisions\/38"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media\/30"}],"wp:attachment":[{"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxundich.de\/en\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}