7 comments

  • v-yadli 2391 days ago
    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

    • allendoerfer 2391 days ago
      DrawIt is useful for simple diagrams.

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

    • sebashwa 2391 days ago
      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!

      • v-yadli 2390 days ago
        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!

      • nameless912 2391 days ago
        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.
    • abhirag 2391 days ago
      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 :)

      • v-yadli 2390 days ago
        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 :)

  • skocznymroczny 2391 days ago
    Next up: tell inexperienced people to try to exit Vim and use it as entropy source for random number generation
  • twoquestions 2391 days ago
    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.
  • flanbiscuit 2391 days ago
    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
    • fenwick67 2391 days ago
      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.
      • laumars 2391 days ago
        There's already a few out there that does this. I use pixterm in one of my own projects:

        http://github.com/eliukblau/pixterm

      • fenwick67 2391 days ago
        For those playing at home, I just made this work:

        https://codepen.io/fenwick/full/oGVQNX/

        • laumars 2391 days ago
          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)
        • sebashwa 2391 days ago
          This is great! I will go ahead and write a similar export function for vixl44.
      • sebashwa 2391 days ago
        Wow, cool project! If you want to collaborate on vixl44 for the feature to export something terminal-printable, feel free to do so
    • sebashwa 2391 days ago
      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!
    • jessemillar 2391 days ago
      You should totally make a GitHub issue for that feature suggestion.
    • sebashwa 2389 days ago
      Hey just FYI: This is now possible with :exp FILENAME.ansi which dumps the corresponding ANSI escape sequences to a file
  • ramses0 2391 days ago
    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!

    • sebashwa 2391 days ago
      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/

      • ramses0 2387 days ago
        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.
  • kmnt 2391 days ago
    I think gvim already supports colour rendering of x pixmaps which double as C source code.
  • manbearpigg 2391 days ago
    This is a clever idea. Good job! I would love to see a real vim plugin as v-yadli suggested.