I use geditfor most of my text editing, but markdown support is very limited.

Things I’ve tried:

  • vscode, too heavy and intrusive
  • Google docs, only renders, doesn’t show the plain text, need to manually export to see markdown
  • Eclipse, haven’t actually tried markdown, but I have no doubt that it’s supported, but heavier than anything else
  • atom, no longer developed last time I checked
  • online editor, don’t want to share my text and functionality is poor
  • type markdown, save it and render with pandoc, lots of effort, but the results are good

Over to you.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    5 hours ago

    Emacs’s Markdown mode has two options for preview:

    • C-c C-c p (Control-C Control-C p) runs markdown-preview, which will open a preview in a new window

    • C-c C-c l runs markdown-live-preview mode, which will show an updated-as you edit preview next to the text.

    In addition to built-in functionality, in my emacs setup, I also personally bind C-c a k to run Make. In my init.el:

    (global-set-key (kbd "C-c a k") 'compile)
    

    That way, if you have any sort of project – which could hypothetically be a Markdown file – and a Makefile for it in the same directory, it’ll build it. An example Makefile:

    all: foo.pdf
    
    %.pdf: %.md
    	pandoc -f markdown -t pdf $< -o $@
    

    Editing foo.md in emacs and hitting C-c a k will regenerate the pdf using pandoc with that setup. It sounds like you’re familiar with pandoc.

    If you have evince running on foo.pdf, it’ll monitor changes to the displayed pdf file, and then just update its display if the file changes.