sponsor Vim development Vim logo Vim Book Ad

TeTrIs.vim : A tetris game in pure vim

 script karma  Rating 1165/409, Downloaded by 25524  Comments, bugs, improvements  Vim wiki

created by
Gergely Kontra
script type
A funny way to get used to VIM's h k l and <Space> key.
The first (I hope) interactive game inside pure VIM!
It's a work-in-progress version.

- better random
- better timing
- shorter code

If you like games, also see Sokoban vimscript#211!
install details
Source it! Press :source TeTrIs.vim<Enter>

To start the game, press <Leader>te.
(If you don't know what is <Leader>, you should press \te, and type :help Leader<Enter> to learn about what the heck leader is)
h: left
l: right
j: down
i,k: rotate
<Space>: drop
<Esc> or q: quit
(if you have more or other keys, which help you to learn VIM, please send me the mail)
p: pause game To restore, press <Leader>te in any window!

*** Save everything, before you begin to play ***

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
TeTrIs.vim 0.53 2017-02-07 7.0 Gergely Kontra This version is written by Felix Leger

- Shape rotations now match official Super Rotation System (SRS)
- High scores don't wrap around when displayed
- First shape is now always random (instead of always being a bar)
- Shapes' color scheme now matches official Tetris colors as closely as possible (since default terminal ANSI doesn't support orange for L shape, that one is white instead
- Since v0.5, colors are randomly attributed. Now each shape has its own color, like in official Tetris
- Shapes now are homogeneously colored, we see MM, {}, $$, etc. only if colors are disabled (note: can be reverted if dark foreground colors are switched to light foreground colors, see comment in code)
- Wall and \"next piece\" frame now have texture (i.e. light color foreground), helps not confusing the J piece (same color)
- Made default speed slower, closer to official (similar to v0.4)
- Can't acheive infinite speed (i.e. break game) by holding +. Also, speeds grows 10 times faster when + is held (otherwise almost unnoticeable)
tetris.vim 0.52fix 2002-02-27 6.0 Gergely Kontra norm -> norm! to protect from M$-win's remappings
tetris.vim 0.52 2002-02-20 6.0 Michael Geddes Fixed massive slowdown when key pressed.
Fix up window positioning when ending and showing highscore.
TeTrIs.vim 0.51 2002-02-19 6.0 Gergely Kontra New timing, bug fixes, Name is stored in script-variable.
TeTrIs.vim 0.5 2002-02-14 6.0 Gergely Kontra New mode, top10, better colors, improved rotation, new timing, speedup, animations
TeTrIs.vim 0.4 2002-02-04 6.0 Michael Geddes Colour, speeds, extra keys, the missing piece. Lotsa stuff.
TeTrIs.vim 0.1 2002-01-03 6.0 Gergely Kontra Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo