elementary / code

Code editor designed for elementary OS
https://elementary.io
GNU General Public License v3.0
468 stars 112 forks source link

Markdown Preview Plugin #340

Open Nine-H opened 6 years ago

Nine-H commented 6 years ago

It'd be cool to preview markdown in the editor window.

A considerable amount of software is developed on github and they have a standard of putting documentation in a README.md in the root of a project directory. It'd be cool to support this and sort them near the top of a folder in the folder browser. (I think gitlab does something similar).

It'd be nice to toggle this in the editor so you can switch quickly between doc reading mode and markdown editing mode.

We have a browser preview plugin, so maybe the web view code in that could be recycled somehow.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/55483349-markdown-preview-plugin?utm_campaign=plugin&utm_content=tracker%2F61917289&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F61917289&utm_medium=issues&utm_source=github).
danirabbit commented 6 years ago

Hrm I’m kinda inclined to say “out of scope” just because there are several purpose-built markdown editors in AppCenter already. Maybe making sure it’s easy to open files in another app is a better way forward here? But I can see the argument that markdown files are an important part of a GitHub based workflow. I’m kinda torn

cassidyjames commented 6 years ago

Perhaps it could be focused on displaying .md files well, but not necessarily more of a full-featured editing UI than the current experience? I do feel like the ability to intelligently display markdown files would bring Code more in line with a code-focused editor than just a generic text editor.

cassidyjames commented 6 years ago

@danrabbit another possibility is to do something smart with the sidebar, where we actually add the rich README contents of the current parent directory there as another tab? My only worry would be if such a typically-skinny sidebar would be actually useful for a project README or not.

btkostner commented 6 years ago

I think putting it in the sidebar would be really small for most content. Idealy, I would love it if when you opened a markdown file, it automatically split the editor and had a preview on the right side.

ryanleesipes commented 5 years ago

I have to say that grabbing a dedicated markdown viewer to look at a README (or see the results of your edits to one) is a bit weird when most other editors have a plugin or some way to view them within the application.

I support a markdown plugin for Code.