Skip to content

christopherjmedlin/vimcanvas

Repository files navigation

?????

What is vimcanvas?

Vimcanvas is a website in which you can collaboratively edit colored ASCII art with Vim-like controls. Websockets are used so that you can see others editing in real time. In the future I might add other features to make things a little more fun.

How do I use it?

In order to create a canvas, use the touch command. You can then edit that canvas using the vim command. To list canvases, use the ls command. The editor, like Vim, uses the h, j, k, and l keys for navigation. To change a character, first enter insert mode using a or i, then type the character you want to change it to. To run an editor command, use the : key. To change the color of a character, use the color command, followed by the hex code of your color. Arguments like red and yellow also work. Finally, to change a large grouping of characters, you can highlight by entering visual mode with the v key. In this mode, instead of using insert mode to change a character, simply use the char command. Further information regarding these commands and keys is available below.

I created a canvas and it disappeared.

Currently, canvases get deleted after the last user has disconnected. I want to one day develop a feature that enables users to save canvases in a database, as well as a feature that allows the exportation of a text file containing the contents of the canvas. The former would also require a user authentication system. For now, however, no such feature exists.

Why would you waste your time making something so pointless?

Because I have alot of free time.

Commands

Terminal

echo <text>

Prints the first argument.

ls

Shows all currently available canvases.

vim <canvas_name>

Brings up an editor for the specified canvas.

touch <name>

Creates a new canvas with the specified name.

Editor

color <color>

Colors the selection with the specified CSS color value.

char <char>

Changes the selection to the specified char. Normally one would use insert mode for this, however such a command is necessary in visual mode.

location

Outputs the user's x and y coordinates respectively on the canvas.

move <x> <y>

Moves the user to the specified coordinates. In conjunction with the location command, this can be used to move to another person's location if you can't find them.

q, wq, x

Quits the editor.

Editor Controls

h, j, k, l

Move left, down, up, and right respectively.

SHIFT + (h, j, k, l)

In visual mode, this will move the entire highlight space as opposed to extending or shrinking it.

a, i

Enter insert mode.

escape

Exit insert/visual mode and go back to normal mode.

+, -

Zoom in and out.

About

Website for collaboratively editing ASCII art

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published