line drawing inside vim

193 views
Skip to first unread message

Eric Smith

unread,
Oct 20, 2011, 10:35:40 AM10/20/11
to vim users
Is there a current script for simple drawing of lines or shapes while
in vim?

I tried http://www.vim.org/scripts/download_script.php?src_id=8798
which is DrawIT and received mutiple errors (not necesarilly due
to an error in the script?).

Thanks for any suggestions

--
- Eric Smith

Reid Thompson

unread,
Oct 20, 2011, 10:44:14 AM10/20/11
to e...@fruitcom.com, vim...@googlegroups.com

post your errors, someone may have some insight -- Drawit works very
well for me.

Tim Chase

unread,
Oct 20, 2011, 10:45:25 AM10/20/11
to vim users
On 10/20/11 09:35, Eric Smith wrote:
> Is there a current script for simple drawing of lines or shapes while
> in vim?
>
> I tried http://www.vim.org/scripts/download_script.php?src_id=8798
> which is DrawIT and received mutiple errors (not necesarilly due
> to an error in the script?).

While I've not tried them, in addition to DrawIT, you might poke
at any of the following to see if they meet your needs:

drawing.vim
http://www.vim.org/scripts/script.php?script_id=11

sketch.vim
http://www.vim.org/scripts/script.php?script_id=705

boxdraw
http://www.vim.org/script.php?script_id=173

-tim


Tim Chase

unread,
Oct 20, 2011, 10:52:19 AM10/20/11
to vim users
> I tried http://www.vim.org/scripts/download_script.php?src_id=8798
> which is DrawIT and received mutiple errors (not necesarilly due
> to an error in the script?).

I see Dr. Chip authored the DrawIT script. He's pretty active
both in keeping his scripts up to date and participating here on
the list, so if you include details on whatever error you're
getting, it may help [mostly Dr. Chip] diagnose what's going on
(and possibly how to fix it).

-tim

Charles Campbell

unread,
Oct 20, 2011, 12:25:39 PM10/20/11
to vim...@googlegroups.com
I haven't had a DrawIt bug report for awhile. Some suggestions:

* use v11l from
http://drchip.0sites.net/astronaut/vim/index.html#DRAWIT -- that's the
most recent one (that's version eleven, letter "l")
* if the problem persists with v11l, please let me know what your
settings are (ie. from your .vimrc). Often problems are due to settings
you use that I don't or vice versa.
* DrawIt does use the keypad: are you using vim or gvim? Try using
gvim; if the problem disappears, then its possible that vim isn't
understanding your keypad (ie. its a terminal problem).
* make sure your "NumLock" key is off

Regards,
Chip Campbell

sc

unread,
Oct 20, 2011, 6:51:19 PM10/20/11
to vim...@googlegroups.com

> drawing.vim
> http://www.vim.org/scripts/script.php?script_id=11

> sketch.vim
> http://www.vim.org/scripts/script.php?script_id=705

> boxdraw
> http://www.vim.org/script.php?script_id=173
┌──────────────────────┐
│ October 2011 │
│ Su Mo Tu We Th Fr Sa │
│ 1 │
│ 2 3 4 5 6 7 8 │
│ 9 10 11 12 13 14 15 │
│ 16 17 18 19(20)21 22 │
│ 23 24 25 26 27 28 29 │
│ 30 31 │
└──────────────────────┘

this last is a godsend -- thank you tim -- i've been looking
for those characters for ages -- thought they were GONE it's
been so long since i've seen them -- must have spent hours
scrolling through :dig displays without finding them

sc

Tim Chase

unread,
Oct 21, 2011, 7:32:27 AM10/21/11
to vim...@googlegroups.com, sc

Glad you found it helpful, though the entire list was just a
simple google away. I must say that I used to have a scary
number of those ASCII line-drawing characters memorized for
entering them into DOS programs/source-code. Those brain-cells
have long since been reallocated for other purposes :)

-tim

Eric Smith

unread,
Oct 21, 2011, 8:42:14 AM10/21/11
to vim...@googlegroups.com

> I haven't had a DrawIt bug report for awhile. Some suggestions:
>
> * use v11l from
> http://drchip.0sites.net/astronaut/vim/index.html#DRAWIT -- that's
> the most recent one (that's version eleven, letter "l")

Thanks Chip

All sweetness and light now.

Eric

Ben Fritz

unread,
Oct 21, 2011, 5:13:51 PM10/21/11
to vim_use


On Oct 20, 9:45 am, Tim Chase <v...@tim.thechases.com> wrote:
> On 10/20/11 09:35, Eric Smith wrote:
>
> > Is there a current script for simple drawing of lines or shapes while
> > in vim?
>
> > I triedhttp://www.vim.org/scripts/download_script.php?src_id=8798
> > which is DrawIT and received mutiple errors (not necesarilly due
> > to an error in the script?).
>
> While I've not tried them, in addition to DrawIT, you might poke
> at any of the following to see if they meet your needs:
>
> drawing.vimhttp://www.vim.org/scripts/script.php?script_id=11
>
> sketch.vimhttp://www.vim.org/scripts/script.php?script_id=705
>
> boxdrawhttp://www.vim.org/script.php?script_id=173
>

I think all these could also be enhanced by txtfmt, if you want a
splash of color:

http://www.vim.org/scripts/script.php?script_id=2208

Charles E Campbell Jr

unread,
Nov 23, 2011, 2:57:47 PM11/23/11
to vim...@googlegroups.com
DrawIt now supports utf-8 and cp437 line drawing characters; if you're
interested, you may check into
http://drchip.0sites.net/astronaut/vim/index.html#DRAWIT for a copy.

Regards,
Chip Campbell

sc

unread,
Nov 23, 2011, 4:34:14 PM11/23/11
to vim...@googlegroups.com
On Wednesday, November 23, 2011 13:57:47 Charles E Campbell Jr
wrote:

> >> boxdraw
> >> http://www.vim.org/script.php?script_id=173
> >>
> > ┌──────────────────────┐
> > │ October 2011 │
> > │ Su Mo Tu We Th Fr Sa │
> > │ 1 │
> > │ 2 3 4 5 6 7 8 │
> > │ 9 10 11 12 13 14 15 │
> > │ 16 17 18 19(20)21 22 │
> > │ 23 24 25 26 27 28 29 │
> > │ 30 31 │
> > └──────────────────────┘
> >
> > this last is a godsend -- thank you tim -- i've been looking
> > for those characters for ages -- thought they were GONE it's
> > been so long since i've seen them -- must have spent hours
> > scrolling through :dig displays without finding them

> DrawIt now supports utf-8 and cp437 line drawing characters;
> if you're interested, you may check into
> http://drchip.0sites.net/astronaut/vim/index.html#DRAWIT for a
> copy.

i hope you didn't add their support on my account -- i can
imagine it was a lot of work -- what makes script 173 so
perfect for me is the fact that it comes with a perl script
(bdua2b.pl) you can filter an ascii box through and it will
turn it into a utf-8 box, thus dovetailing with my overall
desire to not complicate my vim with any plugins -- i'm a huge
fan of 173 -- had it for 34 days and have not, nor have i any
intention of ever installing it as a plugin

the only trick to using it is you have to be careful if you're
filtering a bash script through it not to filter any lines
with an ascii pipe symbol -- it'll convert those too

sc

Reply all
Reply to author
Forward
0 new messages