I use gedit for 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.

Edit: Had some issues with my Lemmy client, moved to Voyager and hopefully I can fix things.

I was asked what functionality I require, which to be fair, I hadn’t considered because I use my editor for pretty much everything.

Ideally I’d be able to use it to either see the raw markdown or the rendered version of whatever I’m writing, code in a dozen languages, articles, websites, legal documents, books, all of which I do pretty regularly.

The side-by-side view doesn’t do it for me, I’d more likely than not have multiple windows open with different documents instead.

It should do autocomplete, syntax highlighting, bracket closing, live spell checking in a variety of languages, launch quickly, be rock solid when faced with a massive log file and allow me to add menu-items to run bash scripts that do things like calculate the time it would take me to read out the text at my normal podcast reading voice or covert weird characters into html-entities.

There have been many wonderful suggestions, most of them do the preview side-by-side which pretty much eliminates them as a candidate.

There are many suggestions to use a vscode floss version, but the biggest issue with vscode is its weight and I’m not sure if it changes by moving to the floss version. I note that my search for that tool brought me many AI features, which is why I did a hard pass and why I can’t remember its name ATM. (Edit: Codium)

I’ve been using Debian since 1999 and still struggle with remembering the vi control codes, so emacs is unlikely to get in the door.

So, with that in mind, whadayagot?

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

    The side-by-side view doesn’t do it for me, I’d more likely than not have multiple windows open with different documents instead.

    That’ll probably rule out text editors like emacs if you don’t want side-by-side. Emacs has some functionality that can do some styling, but you probably won’t have a purely WYSIWYG mode for, say, tables. It looks like emacs has some way to translate org-mode tables to Markdown, but that’s probably not quite what you want.

    It should do autocomplete, syntax highlighting, bracket closing, live spell checking in a variety of languages, launch quickly, be rock solid when faced with a massive log file and allow me to add menu-items to run bash scripts that do things like calculate the time it would take me to read out the text at my normal podcast reading voice or covert weird characters into hrml-entities.

    That’ll rule out most “small” programs targeting specifically Markdown.

    Depends on what you mean by “massive” log files. If you mean you require out-of-memory editing – the ability to load only a small portion of the document into memory, which is probably going to be necessary once you exceed your machine’s main memory – then you’re looking at a small set of software. Some hex editors, emacs can use vlf (which will constrain other features available), a few programs targeting specifically this feature.

    I haven’t looked at heavyweight word processors, but some may have reasonable support for at least many of those, stuff like LibreOffice. They probably won’t open quickly, but there are a few programs capable of speeding up startup by leaving a daemon running, just opening something in that daemon, like emacs, urxvt, etc. You can possibly do that or just leave a blank document open on another workspace.

    • Onno (VK6FLAB)@lemmy.radioOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 hours ago

      Not sure if this will reply properly (new Lemmy client), but you made some excellent points.

      I’m loathe to leave an app window open because I don’t want the editor to “help” when I’m wanting to replace text in all open windows and discover that it did so on another workspace. I tend to launch separate instances for each set of files.

      The massive file comment really stems from opening a file without checking every time how big it is and getting locked out of your editor whilst it chokes on a json or xml file with no line breaks. At the time of writing, all I could think of was log files.

      I am beginning to suspect that I’m going to need to use multiple editors and I can’t say that this fills me with joy.

      • tal@lemmy.today
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        19 minutes ago

        considers tradeoffs

        So, if it were me, I’d probably use a text editor, as the big text editors are going to be able to do the rest of those. I’ve authored text in a number of lightly-annotated-text formats like Markdown and similar (AsciiDoc, Docbook, Markdown), and I always did it in emacs, and generally vim has analogous functionality.

        If you don’t mind me asking, what is the use case for this? Markdown originally had the design goal to be easily-editable as plain text – that is, one could view it as plain text almost as well as in a rendered form. That was kind of its selling point relative to many other rich text markup languages; it was intended to let a user edit and read it in a plain-text editing environment, without even colorization and such.

        Markdown, unlike, say, PDF or Microsoft Word or something, is intended to be display-device-agnostic. That is, if you distribute a Markdown file to others, what the end user will see may differ from what you see, because Markdown intentionally abstracts the specifics of how the material is displayed. Normally, WYSIWYG is mostly-useful for formats that don’t do this. If you’re using Markdown to author PDFs or printed pages or something and then using that format for distribution, I get that. But if you’re handing out Markdown, what you see might not be what the end user sees; screen size differences, typeface differences, other things may pretty-dramatically change what they see. Even above-and-beyond device differences, the Lemmy Web UI, Mbin, the Lemmy clients that I’ve used, Reddit, and GitHub all use intentional variations on the basic Markdown format. IIRC from last time I used pandoc, it supports multiple of the different dialects, but even it can’t provide a representation for every one. Lemmy recently ripped out the auto-renumbering of numbered lists. IIRC either Reddit or Lemmy disabled huge top-level headers after people abused them to flood threads (though maybe that’s a per-community/subreddit CSS thing). Reddit doesn’t support Markdown’s syntax for inline images (well, old.reddit doesn’t, at any rate, and I haven’t tested new.reddit). Many websites and client software packages that present Markdown permit a user to view it in light-on-dark or dark-on-light or have other theming options.

        Is it to make sure that there are no errors in the Markdown leading to some kind of wonky display, say (like a table row missing a trailing pipe or something)? There may be a non-editable-WYSIWYG way to accomplish that that might work with text editors. pandoc may have the ability to emit errors, and it looks like there are Markdown linting packages. It may be possible to rig those up to a text editor to highlight any errors. If I were doing it in emacs, I’d guess that flycheck can run a command in the background during idle time to check for errors and flag them. I don’t know how vim does it, but I’m sure that it has an analogous feature.

        kagis

        It looks like flycheck already does support running markdownlint in the background to highlight errors in Markdown, actually:

        https://www.flycheck.org/en/latest/languages.html

        Supported Languages

        Markdown

        markdown-markdownlint-cli

        Check Markdown with markdownlint-cli.

        goes to try it out

        On my system, I just needed to install markdownlint, and then enable the flycheck minor mode (M-x flycheck-mode) when in markdown-mode. Then emacs starts highlighting errors in the Markdown text, and one can get a list of errors in the document and jump to each.

        It looks like markdownlint is pretty nitpicky out of the box (warns about line length, trailing whitespace, multiple consecutive blank lines), but I expect that that’s configurable. It also did pick up on table column count mismatches, which is the main thing that I can think of to ask it for.

        I also see a couple of vim extensions for markdownlint. Can’t speak as to their functionality, but there’s some level of integration there as well.

        • Onno (VK6FLAB)@lemmy.radioOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          37 minutes ago

          I hadn’t considered thinking of markdown as something that could be syntax checked, but that idea opens up a whole host of options, after all is said and done, I’m still a code monkey :)

          I generally use markdown to create various different types of documents:

          • eBooks, consisting of one document per chapter, collated and generated into EPUB by pandoc.
          • Legal documents and system and proposal documentation, made into PDF, also by pandoc.
          • HTML text for use on static sites, also pandoc.
          • Documentation for git repos, native.
          • Note taking during meetings and phone calls, native.
          • Invoice generation, though tables are not really suitable, but I’m working on it.

          Most of that is likely able to be handled by a live syntax checker and I could easily add a few pandoc commands to my current editor.

          I’m beginning to suspect that I’m looking at this from the wrong end.

          Thank you!