99

GitHub - previm/previm: Realtime preview by Vim. (Markdown, reStructuredText, te...

 5 years ago
source link: https://github.com/previm/previm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.mkd

README in English

Previm

プレビュー用のVimプラグインです。

previm

対応フォーマット

依存

変換のため

Markdownとtextileの場合は必須なものはありません。
reStructuredTextの場合はrst2html.pyが必要です。
docutilsをインストールするとrst2html.pyコマンドが使えるようになります。

% pip install docutils
% rst2html.py --version
rst2html.py (Docutils 0.12 [release], Python 2.7.5, on darwin)

プレビューを開くため

必須なものはありません。
open-browser.vimは任意で使用できます。

使い方(Markdownの場合)

  1. .vimrc にて g:previm_open_cmd を定義します
    • この値はコマンドラインから実行できるコマンドです
    • たとえばMacなら open -a Safari などです
    • :help g:previm_open_cmd を参照してください
    • open-browserを使う場合は設定不要です
  2. filetype がMarkdownのファイルの編集を開始します
    • 注意:拡張子が.mdの場合はmarkdownではなくmodula2として認識されてしまいます。その場合は以下の設定を.vimrcに記述してください
    augroup PrevimSettings
        autocmd!
        autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} set filetype=markdown
    augroup END
  3. :PrevimOpen を実行してブラウザを開きます
  4. 元のVimバッファに戻り編集を続けます
  5. 変更の度にブラウザの表示内容が更新されます

mermaid

mermaidに対応しています。

```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->E;
```

previm


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK