我想用VIM在多种操作系统的编辑reStuctured文本文档。

我发现这个张贴 http://www.zopyx.com/blog /编辑-reStructuredText的与 - VIM

您可以帮我拿出线,实现同样的效果,当一个MS-Windows操作系统上运行?

难道还可以向使用环境变量来指定临时文件的位置?

With an additional line in your .vimrc configuration file you can configure your own command that converts the buffer to HTML, saves the generates HTML on the filesystem and starts Firefox to preview the file:

.vimrc (LINUX):
:com RP :exec "Vst html" | w! /tmp/test.html | :q | !firefox /tmp/test.html

.vimrc (MacOSX):
:com RP :exec "Vst html" | w! /tmp/test.html | :q | !open /tmp/test.html

and you call the conversion pipeline from vim using new 'RP' command (RestPreview):

:RP
有帮助吗?

解决方案

我可以想象,这将是简单:

:com RP :exec "Vst html" | exe "w! " . $TMP . "/test.html" | :q | exe "silent !cmd /c start " . $TMP . "\\test.html"

说了这么多,我不知道为什么:exec用于运行VST,不这项工作?

:com RP Vst html | exe "w! " . $TMP . "/test.html" | :q | exe "silent !cmd /c start " . $TMP . "\\test.html"

我没有虽然安装VST插件,所以无法进行测试。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top