MS-Windows上でのvimで編集しているときにFirefoxでreStructuredTextのプレビュー

StackOverflow https://stackoverflow.com/questions/1310989

質問

私は、オペレーティングシステムの数にreStucturedテキスト文書を編集するためにVIMを使用したい。

私は、この投稿を見つけた 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