Eclipse Markdown 插件 - 如何在双击 .md 文件时打开 Markdown HTML 预览?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19010407/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Markdown Plugin - How to open Markdown HTML Preview when double clicking a .md file?
提问by Catfish
I just installed the Markdown plugin for Eclipse. I'd like to have it so that if I double click a .mdfile, it will open the markdown HTML preview view, or at a minimum be able to right click and view in Markdown HTML Preview.
我刚刚为 Eclipse 安装了 Markdown 插件。我想要它,这样如果我双击一个.md文件,它就会打开 Markdown HTML 预览视图,或者至少可以右键单击并在 Markdown HTML 预览中查看。
Is there anyway to do this?
有没有办法做到这一点?
回答by iled
Perhaps this is not exactly what you've asked for, but if you open the Markdown HTML Previewview and leave it open, it will automatically change to whatever .MDfile you are actually editing. So, just leave that Viewopen and it will perform as you want. You can then save your Perspectiveto keep that preference (Eclipse does that for you anyway).
也许这不是您所要求的,但是如果您打开Markdown HTML Preview视图并将其保持打开状态,它会自动更改为您实际正在编辑的任何.MD文件。因此,只需打开该视图,它就会按照您的意愿执行。然后,您可以保存您的Perspective以保持该首选项(无论如何 Eclipse 都会为您执行此操作)。
More, if you're working with GitHub Flavoured Markdownyou'll want to check the GitHub Flavored Markdown viewer plugin, which actually works with the Markdown plugin, but does the rendering as you can see in GitHub. In this case, you'll actually have what you're looking for: if you right click any .MDfile under your project explorer, there is an option to Show in GFM View, which will open that view in case it is not open already.
此外,如果您正在使用GitHub Flavored Markdown,您将需要查看GitHub Flavored Markdown 查看器插件,该插件实际上与 Markdown 插件一起使用,但会像您在 GitHub 中看到的那样进行渲染。在这种情况下,您实际上将拥有所需的内容:如果您右键单击项目资源管理器下的任何.MD文件,则会有一个选项Show in GFM View,如果该视图未打开,它将打开该视图已经。
回答by Cyrix486
Open your README.md
using the markdown editor (Generate Markdown Previewoption) and open the markdown preview window: Window
> Show View
> Markdown View
.
您打开README.md
使用降价编辑器(生成降价预览选项),然后打开降价预览窗口:Window
> Show View
> Markdown View
。
This will render your .md
file.
这将呈现您的.md
文件。
回答by Alexander Mihailov
(not exact answer)
(不是确切答案)
If you are keyboard/shortcuts fan you can press CTRL+PgUp
right after you open the *.md
file, which will switch to the preview screen.
如果您是键盘/快捷键爱好者,您可以CTRL+PgUp
在打开*.md
文件后立即按,这将切换到预览屏幕。