有 ReST 文件的智能编辑器吗?
我刚刚学习 Sphinx,我需要编辑 ReST 文件。有智能编辑器吗?比如,一个为我提供代码着色、轻松缩进、代码完成(希望)等的编辑器。
I'm just learning Sphinx, and I need to edit ReST files. Is there an intelligent editor for it? Like, an editor that gives me code coloration, easy indentation, code completion (hopefully), etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
vi
非常擅长这一点。我现在刚刚编辑一些.rst
文件,它为标题、等宽文本等着色。宏可以让您非常快速地将文本转换为标题等。vi
is very good at this. I was just editing some.rst
files right now and it colors the headings, monospaced text, etc. The macros let you very quickly turn text into headings and whatnot.具有 rst-mode 的 Emacs: http://docutils.sourceforge.net/docs/user/emacs .html
Emacs with rst-mode: http://docutils.sourceforge.net/docs/user/emacs.html
Leo 做了一些这样的事情。
更多信息来自 使用 Leo 创建文档:
文档后面提到了其他功能。
Leo does some of this.
More info from Creating Documents with Leo :
There are additional features mentioned later in the documentation.
Gedit 有一个 ReST 插件,支持语法突出显示、键盘快捷键(“片段”)和 HTML 预览。
Gedit has a ReST plugin which supports syntax highlighting, keyboard shortcuts ("snippets"), and HTML preview.
Jed 编辑器还有第一种模式:
http://jedmodes.sf.net/mode/rst/
There is also a rst mode for the Jed editor:
http://jedmodes.sf.net/mode/rst/
eclipse 有一个提供所有这些功能的编辑器:
http://marketplace.eclipse.org/content/rest -editor
也
http://resteditor.sourceforge.net/
eclipse has an editor that provides all these features:
http://marketplace.eclipse.org/content/rest-editor
also
http://resteditor.sourceforge.net/
jEdit 还具有 ReST 突出显示功能,但没有 ReST 特定的自动完成功能(尽管它支持宏)。
我个人会选择 vim 或 Cream。
jEdit also has ReST highlighting, but no ReST specific auto-completion features (it does support macros though).
I would opt for vim or Cream, personally.
我使用 vim 并在我的 .vimrc 中有一些有用的映射:
并且经常根据我必须重构的文件动态创建 vim 宏
I use vim and have some useful mappings in my .vimrc:
And often create vim macros on th fly depending on the file I have to restructure
不久前,我尝试了 Atom 编辑器 https://atom.io/。它的优点是甚至可以显示预览,显示可能的图像并正确渲染各部分,甚至显示公式。支持语法高亮,但无论如何,ReST 中没有太多需要高亮的地方。
为了使其正常工作,您必须安装 pandoc 和 Atom 包
language-restructedtext
和rst-preview-pandoc
。您可以使用CTRL-SHIFT-E
激活预览。另一种可能性是 Visual Studio Code,我没有尝试过。
但过了一段时间,我就依赖于简单的 NotePad++,因为一个好的编辑器并没有那么多好处,因为 ReST 已经很简单了。
A while ago I tried the Atom Editor https://atom.io/. It has the benefits of even displaying a preview showing possible images and renders the sections correctly, even formulas are displayed. The syntax highlighting is supported, but there is not much to highlight in ReST anyway.
In order to make it work you have to install pandoc and the atom packages
language-restructuredtext
andrst-preview-pandoc
. You activate the preview withCTRL-SHIFT-E
.Another possibility is Visual Studio Code, which I didn't tried.
But after a while I'm relying on simple NotePad++, as there is not so much benefit in an nice editor, as ReST is already so simple.