sponsor Vim development Vim logo Vim Book Ad

DrawX : ASCII and Unicode Art (etch-a-sketch style)

 script karma  Rating 0/0, Downloaded by 16  Comments, bugs, improvements  Vim wiki

created by
Richard Bentley-Green
 
script type
utility
 
description
INTRODUCTION

DrawX makes ASCII-art drawing relatively easy. You can draw boxes and lines, and there is support for easily including special characters in your drawings. As well as supporting standard ASCII characters, it also supports a number of different line-drawing styles courtesy of the wider Unicode character set

There are two (actually quite separate) drawing functions provided;-

1/ Box drawing - This allows quick drawing of arbitrary-sized boxes, filled with blank space

2/ Tracing - This allows you to move the cursor around and trace a path as you go. Support is provided for joining lines etc

NOTE: This may well work for vim versions prior to 7 - I haven't tried it though

Here is a (rather uninspiring) example. I know it doesn't display very well because it needs a fixed-width font, but it's better than nothing and should give you an idea...


    ┌────────────┐       ╔════════════╗
    │Here's a Box     │       ║Here's a Box     ║
    └─────┬──────┘       ╚═════╤══════╝
                 │                                  │
                 ╰────────┬───────╯
                                    │
                   ╭╌╌╌╌╌╌╌┴╌╌╌╌╌╌╌╮
                   ╎And another Box     ╎
                   ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯

                 ┏━━━━━┓
                ■┃◍   ◍┃■
                 ┃ ═══ ┃
                 ┗━━╦━━┛
             ┌──┳━━━╩━━━┳──┐
             │ ┌┨ ┏┅┅┅┓ ┠┐ │
             │ │┃ ┗┅┅┅┛ ┃│ │
             │ │┃ DrawX ┃│ │
             │ │┃       ┃│ │
             └─┘┃       ┃└─┘
                ┗┳━┳━┳━┳┛
                 ┃ ┃ ┃ ┃
                 ┃ ┃ ┃ ┃
                 ┃ ┃ ┃ ┃
                 ┗━┛ ┗━┛

 
install details
Just un-tar into ~/.vim/bundle/ as usual and read the README file for config options
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
drawx.tar.gz 20/11/20 2020-11-21 7.0 Richard Bentley-Green Initial upload
ip used for rating: 34.200.252.156

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
OSDN