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 50f1b2e316e0bb0002000051

Circle in a square

Probably looks more like "Egg in a rectangle" in most fonts, but it's actually 23x23.

Start file
#######
###########
###############
#################
###################
###################
#####################
#####################
#######################
#######################
#######################
#######################
#######################
#######################
#######################
#####################
#####################
###################
###################
#################
###############
###########
#######
End file
........#######........
......###########......
....###############....
...#################...
..###################..
..###################..
.#####################.
.#####################.
#######################
#######################
#######################
#######################
#######################
#######################
#######################
.#####################.
.#####################.
..###################..
..###################..
...#################...
....###############....
......###########......
........#######........

View Diff

1,8c1,8
< #######
< ###########
< ###############
< #################
< ###################
< ###################
< #####################
< #####################
---
> ........#######........
> ......###########......
> ....###############....
> ...#################...
> ..###################..
> ..###################..
> .#####################.
> .#####################.
16,23c16,23
< #####################
< #####################
< ###################
< ###################
< #################
< ###############
< ###########
< #######
---
> .#####################.
> .#####################.
> ..###################..
> ..###################..
> ...#################...
> ....###############....
> ......###########......
> ........#######........

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 37 remaining solutions by signing in and submitting your own entry
#38 Andrés Llopis / andreselsuave - Score: 71 - 03/04/13 @ 01:31
qqI.<Esc>A.<Esc>q7@q<CR>6@q<CR>4@q<CR>3@q<CR>2@q<CR>2@q<CR>@@<CR>@@8j@@<CR>@@<CR>2@q<CR>2@q<CR>3@q<CR>4@q<CR>6@q<CR>8@qZZ

0 comments


#39 Runar / runarfu - Score: 72 - 01/13/13 @ 10:08
qqI.<Esc>A.<Esc>q7@qj6@qj4@qj3@qj2@qj2@qj@@j@@16G@qj@@j2@qj2@qj3@qj4@qj6@qj8@qZZ

0 comments


#40 AC / quadface - Score: 76 - 10/03/14 @ 20:24
qq:s/^.*$/.\0.<CR>q7@qj6@qj4@qj3@qjqn2@qqj@njVj@q8jVj@qj@nj@nj3@qj4@qj6@qj8@qZZ

0 comments


#41 Peter Lacey-Bordeaux / placeybordeaux - Score: 79 - 01/16/13 @ 15:36
8GqqI.<End>.<Esc>k@qq@q6G@q4G@qjj@qj@qj@q@q@q16GqwI.<End>.<Esc>j@wq@w18G@wkkk@wkk@wk@w@wk@w@wZZ

0 comments


#42 無ん垢の叫び / john_ababa - Score: 84 - 02/10/13 @ 09:22
:%s/$/........<CR>gg<C-V>7jI.<Esc><C-V>6jkI.<Esc><C-V>3jI.<Esc><C-V>2jI.<Esc>4I.<Esc>j2a.<Esc>kV7jy15GpV7j:sor<CR>25GkdG$kh<C-V>1G$dZZ

0 comments


#43 Oliver Christ / 0liverChrist - Score: 90 - 10/07/13 @ 21:53
9G<End>:set tw=23<CR>:set ts=4<CR>:set st<BS><BS>sw=4<CR>:set et<CR>ggVG:center<CR>:%s/ /./g<CR>qayt#<End>p-q22@a9G<End><C-V>6jxZZ

0 comments


#44 Pradeep Kumar / pradeep6kumar - Score: 98 - 01/13/13 @ 12:44
qa:ce23<CR>j0q22@aggqah<C-V>Y<C-V>r.$a `<BS><Esc>p<C-V>r.hxj^q7@a:16<CR>8@a:%s/ /./g<CR>$y5p<C-V>Y5pkl3pk2pkpk.:2<CR>$5pjl3pj2pjpj.ZZ

0 comments


#45 くま55 / kumack55 - Score: 98 - 04/03/13 @ 07:27
8A.<Esc>7hly$j$pjp2xxxkxjja...<Esc>j2a.<Esc>j2a.<Esc>yljpjpjjjjjjjjpjpj2pj2pj3pj4pj6pj8p0qqf.y$0Pk0q@221@q6kk8@qZZ

0 comments


#46 Vim Golfer / vimgolfern00b - Score: 99 - 01/16/13 @ 10:29
:%s_^.*$_\=repeat(".",(23-len(submatch(0)))/2).submatch(0).repeat(".",(23-len(submatch(0)))/2)<CR><CR>:x<CR>

0 comments


#47 RobertT / techrt2050 - Score: 101 - 10/03/13 @ 03:30
q88I.<Esc>8A.<Esc>qjq66I.<Esc>6A.<Esc>qjq44I.<Esc>4A.<Esc>qjq33I.<Esc>3A.<Esc>qjq22I.<Esc>2A.<Esc>qj@2jq1I.<Esc>A.<Esc>qj@1G@8k@6k@4k@3k@2k@2k@1k@1ZZ

0 comments


Created by: udioica

47 active golfers, 120 entries

Leaderboard (lowest score wins):
23
#1 - talineo / talineo_

01/31/2013 at 10:25PM

23
#2 - Urtica dioica / udioica

02/03/2013 at 08:31AM

23
#3 - Trevor Powell / DoomedBunnies

03/21/2013 at 03:45AM

23
#4 - Ingo / ist3fani

05/30/2013 at 12:31PM

23
#5 - Bradd Szonye / bszonye

07/15/2013 at 05:30AM

23
#6 - ———đίxίє—flαтlίиє——— / _dixie_flatline

07/31/2013 at 01:01AM

23
#7 - Dimitar Dimitrov / kurkale6ka

10/15/2013 at 04:37PM

23
#8 - Matthew Draper / _matthewd

02/28/2014 at 06:17PM

23
#9 - John Braxler / braxler

05/28/2014 at 07:13PM

23
#10 - Evgeny`s Kindle / EvgenyKindle

05/14/2018 at 06:57AM

24
#11 - Roberto Bonvallet / rbonvall

04/12/2013 at 11:03PM

25
#12 - Øystein Walle / oysteinwalle

01/30/2013 at 05:15PM

25
#13 - Heath Patterson / HeathPatterson

08/05/2013 at 08:47PM

26
#14 - Joel Elkins / dice_tea

03/02/2013 at 07:15PM

28
#15 - Kerson Hsiao / KersonHsiao

01/14/2013 at 03:10AM

29
#16 - Tobias Praetsch / tpraetsch

02/17/2013 at 12:01AM

29
#17 - Vito / GodFather

03/03/2013 at 08:34PM

31
#18 - Joonas Pihlajamaa / jokkebk

03/16/2014 at 06:16PM

34
#19 - Marco Hinz / _mhinz_

01/13/2013 at 01:50PM

36
#20 - Veg / originalveghead

01/13/2013 at 09:48PM

37
#21 - fabiano taddei / Brodoblu

02/08/2013 at 10:33PM

43
#22 - Luan Santos / cfcluan

01/26/2013 at 08:38AM

44
#23 - Oscar Friberg / oscfri

02/08/2013 at 07:46PM

45
#24 - Gabriele Lana / gabrielelana

01/22/2013 at 08:10PM

46
#25 - jganong / jganong

01/19/2013 at 12:04AM

47
#26 - django unchained / DjangoTuxg

01/17/2013 at 11:37PM

48
#27 - Matthew Ryan / mrmr1993

02/06/2013 at 03:01PM

50
#28 - Foo Bar / foobar01123

06/02/2016 at 09:14PM

51
#29 - Kai Yuan / kentyuan

02/22/2013 at 01:02AM

52
#30 - Christopher Harrison / Xophmeister

01/26/2013 at 06:40PM