Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liuchengxu/graphviz.vim
:christmas_tree: A Vim graphviz plugin
https://github.com/liuchengxu/graphviz.vim
graphviz-dot space-vim vim vim-plugin
Last synced: 3 months ago
JSON representation
:christmas_tree: A Vim graphviz plugin
- Host: GitHub
- URL: https://github.com/liuchengxu/graphviz.vim
- Owner: liuchengxu
- Created: 2018-12-27T13:08:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-30T12:31:25.000Z (10 months ago)
- Last Synced: 2024-06-16T09:35:17.598Z (5 months ago)
- Topics: graphviz-dot, space-vim, vim, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 19.5 KB
- Stars: 67
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Graphviz.vim
An almost completely-rewritten fork of [wmgraphviz.vim](https://github.com/wannesm/wmgraphviz.vim).
- Less commands.
- Simpler configuration.
- Add completion support for [ncm2](https://github.com/ncm2/ncm2) and [coc.nvim](https://github.com/neoclide/coc.nvim).Note: The command `:Graphviz` only exists when you open a `.gv` or `.dot` file.
## Requirement
- [Graphviz](http://www.graphviz.org/)
## Installation
- Using [vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'liuchengxu/graphviz.vim'
```- Clone the repo into your vim config folder
```bash
mkdir -p ~/.vim/pack/vendor/start
git clone https://github.com/liuchengxu/graphviz.vim ~/.vim/pack/vendor/start/graphviz.vim
```## Usage
Open the output file whose filename is based on the current filename with `.format` appended.
```vim
" `.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.
```vim
" 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.
```vim
" :GraphvizCompile [exe] [format]" By default:
" :GraphvizCompile dot pdf
:GraphvizCompile" Specify the output format
:GraphvizCompile png" Specify the exe and format
:GraphvizCompile dot gif
```## Customization
```vim
" 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 = ''
```## Related Projects
- [dot-language-server](https://github.com/nikeee/dot-language-server)