graphviz.vim


Ⅰ. 插件描述

:christmas_tree: A Vim graphviz plugin

Ⅱ. 基本信息

创建日期:  2018-12-27
使用用户:  7
Github星:  19
插件作者:  Liu-Cheng Xu

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'liuchengxu/graphviz-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'liuchengxu/graphviz-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'liuchengxu/graphviz-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/liuchengxu/graphviz.vim

Ⅳ. 文档说明

# Graphviz.vim

An almost completely-rewritten fork of wmgraphviz.vim.

  • Less commands.
  • Simpler configuration.
  • Add completion support for ncm2 and coc.nvim.

Requirement

Installation

Using vim-plug:

Plug 'liuchengxu/graphviz.vim'

Usage

Open the output file whose filename is based on the current filename with .format appended.

" `.format` is 'pdf' by default.
" Option: 'ps', 'pdf', 'png', 'jpg', 'gif', 'svg'
:Graphviz

" Open the generated png file
:Graphviz png

:Graphviz! is same with :Graphviz, but compile first if the output file does not exist.

" Open the generated png file, try compiling if the target does not exist.
" Options are same with `:GraphvizCompile`.
:Graphviz! png

:Graphviz!! is same with :GraphvizCompile | Graphviz!.

Compile the graph in the same directory as the current source dot-file.

" :GraphvizCompile [exe] [format]

" By default:
" :GraphvizCompile dot pdf
:GraphvizCompile

" Specify the output format
:GraphvizCompile png

" Specify the exe and format
:GraphvizCompile dot gif

Customization

" How to open the generated output file.
" If does not exist, graphviz.vim will automatically choose the right way depending on the platform.
let g:graphviz_viewer = 'open'

" Default output format. Default is 'pdf'.
let g:graphviz_output_format = 'pdf'

" Options passed on to dot. Default is ''.
let g:graphviz_shell_option = ''

添加新评论