TeTrIs.vim - A tetris game in pure vim : vim online

sponsor Vim development Vim logo Vim Book Ad
not logged in (login)



TeTrIs.vim : A tetris game in pure vim

script karma Rating 1258/441, Downloaded by 30077 Comments, bugs, improvements Vim wiki

created by
script type
game
description
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.

Todo:
- 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)
Controls:
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

Changelog:
- 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: 40.74.122.252

Questions about Vim should go to the maillist. Help Uganda. Vim at Github

AltStyle によって変換されたページ (->オリジナル) /