dorkhub

vim-diagon

Vim wrapper of Diagon API to generate simple Unicode or ASCII diagrams

wiwiiwiii
Vim script1144 forksMITupdated 4 years ago
git clone https://github.com/wiwiiwiii/vim-diagon.gitwiwiiwiii/vim-diagon
This was my first plugin mainly for practice, so it doesn't contain much functionality other than one command. Please use and star it if you like it, but it won't be in active development in the near future. If you would like some new features, don't hesitate to open an issue or PR.

Vim Diagon

Vim wrapper of Diagon API to generate simple Unicode or ASCII diagrams

Table of Contents

Prerequisites

Diagon's command line interface is required for this plugin to work.

sudo snap install diagon

Installation

Use your favorite package manager.

Usage

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.

Options

  • Use echo instead of replacing original text directly. Default 0.
let g:diagon_use_echo = 1

Mappings

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>

Credits

Thanks to @ArthurSonzogni for his efforts on Diagon.

License

Copyright © 2021 Will Chao. Distributed under the MIT license.

more like this

vim-dap

Vim/Neovim debugger plugin providing a terminal interface to the Debug Adapter Protocol

Vim Script50

vim-halo

:innocent: Visual highlight for your cursor.

Vim script50

search

search projects, people, and tags