Vim wrapper of Diagon API to generate simple Unicode or ASCII diagrams
Diagon's command line interface is required for this plugin to work.
sudo snap install diagon
Use your favorite package manager.
Visually select lines in Diagon syntax and call Diagon type [options]
.
A type must be given while options are usually not needed. Refer to Diagon's documentation for a detailed explanation on its syntax, types and options.
Command Diagon
accepts a range, if not given then defaults to current line.
- Use echo instead of replacing original text directly. Default 0.
let g:diagon_use_echo = 1
No default predefined mappings are provided. You can remap commands to your need.
noremap <Leader>D :Diagon<Space>
noremap <Leader>dm :Diagon Math<CR>
noremap <Leader>ds :Diagon Sequence<CR>
noremap <Leader>dt :Diagon Tree<CR>
Thanks to @ArthurSonzogni for his efforts on Diagon.
Copyright © 2021 Will Chao. Distributed under the MIT license.