Vim Tips Wiki


Revision as of 07:57, November 15, 2011 by JohnBot (Talk | contribs)

1,613pages on
this wiki

Use this page to discuss script 3409 HJKL: game using H,J,K,L to explore a maze

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.





It could be useful if it does not create a new buffer if the one we are in is empty. For instance, I just changed the beginning of the HJKL() function to be

 414 function! s:HJKL(...)
 416     if bufname("%") != ''
 417         "create new window for game
 418         new
 419         resize 100
 420     endif

Bug: Exits Vim

After the game has been won, or when 'q' is pressed, the current Vim window closes. If only one window exists, however, it exits Vim completely, thus requiring the user to create a new window beforehand (and set it to max height, or the game returns a message that it needs more room). This is true of both Vim and gVim. The user is not notified as it says "type q to quit the game". You might want to fix this.

Around Wikia's network

Random Wiki