Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 GitHub - qindapao/vimio: A vim plugin for drawing ASCII or unicode diagram
Nothing Special   »   [go: up one dir, main page]

Skip to content

qindapao/vimio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vimio

Vimio is a lightweight Vim plugin for drawing text-based diagrams—such as flowcharts, architecture sketches, and layout mockups—using only ASCII and Unicode characters, directly in your editor.

                __     __  _               _ 
                \ \   / / (_)  _ __ ___   (_)   ___  
                 \ \ / /  | | | '_ ` _ \  | |  / _ \ 
                  \ V /   | | | | | | | | | | | (_) |       
                   \_/    |_| |_| |_| |_| |_|  \___/        

Inspired by Asciio by Nadim Khemir.

With this plugin, you can draw:

╔════════════════════════════════════════════════════════╗  SGMI(GE) ┌───────┐
║   MAIN BOARD                       ┌────────┐RGMII     ║  ┌───────>│sw6    │
║              SGMII┌──────┐  MDI    │(0)     │    ┌───┐ ║  │   ┌───>│0x01   │
║   ┌────────┐  ┌──>│sw1   │<───────>│P0   RG2│<──>│sw4│<╫──┘   │    └───────┘
║   │GE0/ETH2│<─┘   └──────┘         │     (5)│    │   │ ║      │
║   │  BMC   │      ┌──────┐  MDI    │(1).---.│    └───┘ ║      │    ┌───────┐
║   │GE1/ETH3│<────>│sw2   │<───────>│P1 |sw3|│          ║      ├───>│sw7    │
║   └────────┘      └──────┘         │   '---'│RGMII     ║      │    │0x02   │
║                   ┌──────┐  MDI    │(2)     │    ┌───┐ ║      │    └───────┘
║   ┌──────────┐    │    P0│<───────>│P2   RG1│<──>│sw5│ ║      │
║   │CPU0      │<──>│NIC   │  MDI    │(3)  (4)│    │   │ ║      │    ┌───────┐
║   └──────────┘    │    P1│<───────>│P3      │    └───┘ ║      ├───>│sw8    │
║             PCIEX2└──────┘         └────────┘      ^   ║      │    │0x03   │
╚════════════════════════════════════════════════════╪═══╝      │    └───────┘
                                             SGMI(GE)│          │
                                                     v          │    ┌───────┐
                 ┌─────────────────────────────┐  .-----.       ├───>│sw9    │
                 │                             │  |     |       │    │0x01   │
                 │                             │  |other|       │    └───────┘
                 │                             │  |     |       │    ┌───────┐
                 │     .---------.             │  '-----'    ┌
A56E
──┼───>│sw10   │
                 │     |   BMC   |             │<────────SGM─┼──┼────│0x02   │
                 │     '---------'             │             │  │    └───────┘
                 │                             │             │  │  ┌─────────┐
                 │                             │             │  └─>│Analog   │
                 │    OTHER MAIN BOARD         │             └────>│Switch   │
                 └─────────────────────────────┘                   └─────────┘

here are two demos:

demo_1

demo_2


Features

  • Virtual text mode: draw anywhere, even beyond line ends
  • Line tools: horizontal, vertical, diagonal, with smart joins and automatic cross-point characters
  • Box-drawing: instant rectangles, adaptive corners, auto arrows
  • Erasers: cleanly remove characters, including wide glyphs
  • Clipboard: copy/cut/paste shapes or characters with precision
  • Shape templates: ASCII art, banners, LEDs, and user-defined sets
  • Live preview: floating overlay follows your cursor
  • Highlight marking: select irregular shapes for fine-grained edits
  • CJK support: draw with Chinese, Japanese, and Korean characters

Installation

Requirements

  • Vim 8.2+ compiled with:

    • +popupwin (for popup window support)
    • +mouse (for mouse interaction, optional)
    • +clipboard (for system clipboard integration)
  • Clipboard support on Linux:

    • Install a GUI-enabled Vim build such as vim-gtk3:
      sudo apt install vim-gtk3
  • A GUI version of Vim is recommended (e.g. gVim)
    ⚠️ Neovim is not supported, as Vimio relies on Vim 8's popup_*() API, which Neovim does not implement. Maybe adapted in the future.
    ⚠️ Terminal Vim is partially supported — many features work, including popup windows (with transparency in some terminals), but key mappings may conflict with terminal shortcuts, and rendering could vary depending on terminal emulator. Full support and refinement are planned in future versions.

Using vim-plug

Plug 'qindapao/vimio'

Manual (packages)

mkdir -p ~/.vim/pack/vimio/start
cp -r /path/to/vimio ~/.vim/pack/vimio/start

Then reload Vim or run:

:packloadall

Config

To disable default mappings:

let g:vimio_enable_default_mappings = 0

Then check plugin/vimio.vim for all default mappings and redefine them in your .vimrc as you like.

To define your own set of shape templates:

let g:vimio_custom_shapes_dir = expand('~/.vim/vimio_custom_shapes')
let g:vimio_user_shapes_define_graph_functions = [
      \ ['Vimio__DefineSmartDrawShapesanimal', [0], 0, 'my_animal1.vim'],
      \ ['Vimio__DefineSmartDrawShapesanimal', [0], 0, 'my_animal2.vim'],
      \ ]

Then place your custom template files in the directory you specified (g:vimio_custom_shapes_dir).

⚠️ Important: Please avoid using the following file names in your custom templates, as they are reserved by the plugin and may cause conflicts:

basic.vim
figlet.vim
led.vim
animal.vim

Use unique names like my_animal.vim, custom_led.vim, etc., to ensure compatibility.


Quick Start

Enter virtual text mode:

<Leader>vea

Draw a box:

M-l / M-j / M-h / M-k   " draw lines in four directions

Switch line style:

sl   " cycle line types (ASCII, Unicode, bold, etc.)

Paste a shape:

C-M-Space   " paste shape from clipboard

Preview before pasting:

C-j/k/h/l   " move cursor and show floating preview

Examples

Draw a rectangle in seconds:

.--------.
|        |
|        |
'--------'

Switch to Unicode box-drawing:

┌────────┐
│        │
│        │
└────────┘

Insert a cat from the shape library:

 /\_/\  
( o.o ) 
 > ^ <  

Defining Your Own Shapes

Create a file like draw_shaps/animal.vim and define your ASCII art.
Register it in autoload/vimio/shapes.vim. See vimio.txt section 13 for details.


Project History

Vimio draws its inspiration from and pays homage to Asciio, Nadim Khemir’s object-oriented ASCII/Unicode diagramming suite in Perl 5 that has been evolving for over twenty years.

While Vimio doesn’t aim to replicate Asciio’s full feature set, it brings a focused, minimal approach to diagramming directly within Vim. I collaborated with Nadim on Asciio’s later development and drew heavily from its design philosophy when building Vimio.


Known Limitations

  • Currently tested primarily in GUI Vim (e.g. gVim).
  • Terminal Vim support is experimental and may have rendering issues.
  • TAB characters are not supported in drawing mode.
  • do not surport Neovim, Maybe adapted in the future.

License

MIT License © 2025 qindapao


Credits

Inspired by Asciio by Nadim Khemir.

About

A vim plugin for drawing ASCII or unicode diagram

Resources

Stars

Watchers

Forks

Packages

No packages published
0