Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 5054b935fa0b390002000020

SFD-ROC: Tic-Tac-Toe

Tic-Tac-Toe You are 'X', and it is your turn. Stop 'O' from winning, and complete the game. Draw a diagonal line through your winning row of three X's.

Start file
Tic-Tac-Toe
You are 'X', and it is your turn. Stop 'O' from winning, and complete the game.

       
|   |
      X
| O |
       
|   |
     
-----------
       
|   |
       
|   |
       
|   |
     
-----------
       
|   |
       
| O | X
       
|   |


Bonus: Draw a diagonal line through your winning row of three X's.
End file
Tic-Tac-Toe
You are 'X', and it is your turn. Stop 'O' from winning, and complete the game.

     
\  |   |
      X
| O |
       
\|   |
     
-----------
       
|\  |
       
| X |
       
|  \|
     
-----------
       
|   |\
       
| O | X
       
|   |  \


Bonus: Draw a diagonal line through your winning row of three X's.

View Diff

4c4
<         |   |
---
>      \  |   |
6c6
<         |   |
---
>        \|   |
8,10c8,10
<         |   |
<         |   |
<         |   |
---
>         |\  |
>         | X |
>         |  \|
12c12
<         |   |
---
>         |   |\
14c14
<         |   |
---
>         |   |  \

Solutions

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 53 remaining solutions by signing in and submitting your own entry
#54 Trever Marshall / @dynamic_library - Score: 91 - 10/12/12 @ 10:49
8<Down>9<Right><Right>a\<BS><BS>x <BS><BS>X<Up><Up><Up><Left><Left><Left><Left><Esc><Up><Up><Left>a<Left>\<Right><Right><Right><BS><Down><Down><Left>-<BS>/<BS>\<Right><BS><Down><Down><Right>\<BS>\<Right><Esc>Oq<BS><BS><BS><Up><Up><Down><Down><Down><Left><BS><Up><Down><Down><Down><Left>\<Right><BS><Down><Down><Right>\<Down><Down><Right>  \<Esc>"::;<BS>w<CR>:q<CR>

0 comments


Created by: @Remy_D

54 active golfers, 159 entries

Leaderboard (lowest score wins):
35
#31 - mnx / @mnxx

09/21/2012 at 02:57PM

35
#32 - Peter Lacey-Bordeaux / @placeybordeaux

09/28/2012 at 03:51AM

35
#33 - Yann Moisan / @YannMoisan

02/10/2013 at 02:05PM

35
#34 - James / @Dronak

09/18/2014 at 08:17PM

36
#35 - じょんあば / @john_ababa

09/16/2012 at 12:17PM

36
#36 - vansan / @VinceVansan

09/18/2012 at 08:52PM

36
#37 - Nicholas Amina / @apolatg

09/25/2012 at 06:43PM

36
#38 - Marcelo Paez / @paezao

10/05/2012 at 12:08PM

36
#39 - JonLz / @LzJon

12/26/2012 at 04:13AM

37
#40 - n0nick / @n0nick

11/19/2012 at 02:41PM

38
#41 - Ryan / @devops_yeoman

09/15/2012 at 06:27PM

38
#42 - steve / @steve35773420

03/04/2023 at 07:28PM

39
#43 - Rob Grijs / @robgrijs

10/15/2012 at 06:43PM

40
#44 - Underhill Labs / @underhilllabs

10/31/2012 at 04:03AM

40
#45 - Saxon Unrue / @joeunrue

11/08/2012 at 09:29PM

43
#46 - shahanavaz m / @shahanavazm

04/01/2024 at 09:20PM

44
#47 - Luis Fernando Rodríguez Vargas / @LuisFerRodVar

06/25/2024 at 09:05PM

47
#48 - Alan Kessler / @alankesslr

11/04/2012 at 03:18AM

47
#49 - James S.P. Barth / @sp_barth

12/03/2012 at 08:22PM

50
#50 - Brandon Frazier / @uhok

09/28/2012 at 07:47PM

51
#51 - Jason Wolf / @zephyr_wolf

11/08/2012 at 05:15PM

58
#52 - Arthur Corenzan / @haggen

10/26/2012 at 12:53PM

73
#53 - ralphbean / @ralphbean

09/15/2012 at 09:37PM

91
#54 - Trever Marshall / @dynamic_library

10/12/2012 at 10:49AM