Hacker News new | comments | show | ask | jobs | submit login
Show HN: Vixl44 – Create pixel art inside your terminal using vim movements (github.com)
62 points by sebashwa 4 months ago | hide | past | web | favorite | 23 comments

Brainstorm: what if we really make a vim plugin for pixel art?

I see this to be hugely practical. It will enable rapid charting in source code documentation, and also, solve the table formatting problem once and for all.

Edit: shapes? Patterns? Gradients? Dithering? (Think about cacao) lasso tool? Semantic movement? Like, w moves over all reddish blocks

DrawIt is useful for simple diagrams.


Wow, I never of this being practical in vim. That's an awesome idea! Although I'm not sure it would be 'high res' enough to work for inline code documentation.. If that is what you meant?

Also I love the idea of semantic movement, I'll definitely put it on my feature-list!

Yes, for example if we can do tables with color-background text, it would save columns to draw the column boarders. :)

Even if we go with monochrome charts, it will be super useful for describing data structures and visualizing algorithms.

Also, looking forward to the semantic movement implementation!

Actually, I've been looking for something forever that will do block diagrams in a sane way in vim. If you could get that to work I would literally organize a parade in your honor.

Nice. 'Course there's an Emacs mode to do that. Good ol' M-x artist-mode.

Relevant xkcd -- [https://xkcd.com/378/]

Jokes aside, maybe you can use that for inspiration :)

Here we go again butterfly! Thanks for bringing this up, indeed we may get the goodbits from "the other side".

I'm wondering if artist-mode can be used as a minor mode? Charts everywhere :)

Next up: tell inexperienced people to try to exit Vim and use it as entropy source for random number generation

This looks pretty cool! Pens/mice are great for analog style art (digital painting and the like), but for highly discrete art like pixel art a keyboard looks to be a much better interface at first blush.

Nice. Reminds of the ANSI Art I would see on a BBS back in the day. Is there a way to export the art so that it could be printed in the Terminal. Would love to add some art to some scripts

I have worked on libraries for images in terminals [https://github.com/fenwick67/term-px] but I never thought to make a simple image import / export tool so you could just `cat` the file to show it in a terminal. Now you gave me a weekend project.

There's already a few out there that does this. I use pixterm in one of my own projects:


For those playing at home, I just made this work:


It might be worth using the none standard but we'll supported true colour ANSI escape sequences. You'll get much better output that way (I've done lots of experimenting with images in the terminal and I found that gave me the best output and more reliably then the other ANSI hacks that are limited to only supporting one specific terminal emulator)

This is great! I will go ahead and write a similar export function for vixl44.

Wow, cool project! If you want to collaborate on vixl44 for the feature to export something terminal-printable, feel free to do so

Thanks! Beautifying scripts is a usecase that didn't come to my mind so far. Awesome idea, I don't know why I didn't think about it! So far it is only possible to write your image to a file (which is just some json) or to export to svg, but it shouldn't be much trouble to get something which can be printed to terminal!

You should totally make a GitHub issue for that feature suggestion.

Hey just FYI: This is now possible with :exp FILENAME.ansi which dumps the corresponding ANSI escape sequences to a file

It would be great to have some buttons in C-v mode to "y, p, x" ... and maybe you could (ab)-use %/* while in visual mode to allow rotation or flipping?

Love it!

Thanks for your comment! Yanking is one of the features I want to implement next! Something I already missed when drawing the first pictures or so!

Cool idea to use %/* (or similar) to rotate/flip stuff! I only thought about replacing a certain color with another using %s/

Also if you every played "adom" using "w<motion.hjkl>" could "word-ish" to the next color in that direction. I don't know how much you're still messing with it, but it's a fun problem to think about... transferring useful Vi motions and commands into a new problem domain.

I think gvim already supports colour rendering of x pixmaps which double as C source code.

Applications are open for YC Summer 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact