igrigorik / vimgolf

Real Vim ninjas count every keystroke - do you?
http://www.vimgolf.com/
MIT License
688 stars 65 forks source link

Make the solution preview better #29

Closed psyho closed 13 years ago

psyho commented 13 years ago

It would be very useful to see what hides behind the various \uXXXX combinations for the learning purposes.

ujjwol commented 13 years ago

Ya! also what when are the mode changes ? a generated picture like diagram would be better.

dstoc commented 13 years ago

How about just having ESC, CTRL-R etc. decoded and called out in a different colour?

clvv commented 13 years ago

I think some syntax highlight and indent will be even more helpful. Take keyboard macro for instance, it can be formated like this:

qx

XXXXX

q

so that it would be easier to track the use of macros.

syntax highlight: insertion green, deletion red, cope & paste blue, movement yellow etc.

and maybe translate some of the commands to plain English? like three times move down, delete line, insert after cursor etc. (definitely a good feature for beginners)

and I think all this can be implemented in javascipt.

matthewd commented 13 years ago

https://gist.github.com/760821 is a start, to at least get the representation matching Vim's internal format. scan's block could check whether s.size > 1 to colour special keys -- especially useful because that'd be the only distinction between the start of a special key and a literal '<'.

https://github.com/dira/vimmish looks like it might need a bit of help before it can handle the various obscure commands that vimgolf naturally brings to the fore.

igrigorik commented 13 years ago

Deployed matthewd's keylog! Looks infinitely better than the raw dump :-)

With added benefit of proper scoring...