Vim Tips Wiki
(standard format)
(→‎Comments: Proposing not to create a new buffer if the current is empty)
Line 6: Line 6:
   
 
==Comments==
 
==Comments==
  +
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(...)
  +
415
  +
416 "create new window for game
  +
417 if bufname("%") != <nowiki>''</nowiki>
  +
418 new
  +
419 resize 100
  +
420 endif

Revision as of 13:30, 28 January 2011

Use this page to discuss script 3409 3409

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

Screenshot

Maze

screenshot

Comments

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(...)
 415 
 416     "create new window for game
 417     if bufname("%") != ''
 418         new
 419         resize 100
 420     endif