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 51103ad8041832000200003f

vim = 22 / 7

pi square vim

Start file
vim
End file
 v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
 m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
 v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
 m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
 v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
 m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
 v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
 m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
 v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
 m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
 v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
 m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
 v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
 m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m

View Diff

1c1,21
< vim
---
>  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
> vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
>  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
>  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
> vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
>  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
>  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
> vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
>  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
>  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
> vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
>  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
>  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
> vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
>  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
>  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
> vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
>  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m
>  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v
> vimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvimvim
>  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m  m

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 96 remaining solutions by signing in and submitting your own entry
#97 Yiyang Chen / yiyangc91 - Score: 34 - 03/09/14 @ 15:29
yw21PO<Esc>22i v <Esc>xjo<Esc>22i m <Esc>x:%y<CR>6pZZ

0 comments


#98 Ram Tamtam / ramtamtamtam - Score: 34 - 07/18/14 @ 12:58
O v <Esc>Go m <Esc><C-V>gg0y21Py2j6P:%s/ $<CR>:x<CR>

0 comments


#99 Carlos A Henríquez Q / lagunex - Score: 34 - 01/19/15 @ 08:44
O<Esc>22i  v<Esc>0x+D22po<Esc>22i  m<Esc>0x{3Y6PZZ

0 comments


#100 Jon Krause / jkrause314 - Score: 34 - 10/26/15 @ 00:37
ye21PO<Esc>22i v <Esc>xYjp:s/v/m/g<CR>VHy6PZZ

0 comments


#101 Márton Németh / nemarci42 - Score: 34 - 03/01/17 @ 13:26
yw21PO<Esc>22i v <Esc>xjo<Esc>22i m <Esc>x:%y<CR>6pZZ

0 comments


#102 Brent Carmer / brent_carmer - Score: 35 - 04/14/13 @ 05:05
yw21Po<Esc>22a m <Esc>xyykP:s/m/v/g<CR>yap6PZZ

0 comments


#103 curist / curist - Score: 35 - 07/09/13 @ 03:20
yw21PO<C-C><C-C>22i v <Esc>xjo<C-C><C-C>22i m <Esc>xV{y6PZZ

0 comments


#104 Eric Potter / pottereric - Score: 35 - 12/20/13 @ 19:08
22i v <Esc>xdwo<Esc>22po<Esc>22i m <Esc>x:1,3y<CR>6pZZ

0 comments


#105 pikaren / REALpikaren - Score: 36 - 01/07/14 @ 04:32
O v <Esc>qqv0y21Pq$xj@qo m <Esc>@q$xVkky6PZZ

0 comments


#106 Patrick Pitoscia / Patrick03960431 - Score: 36 - 08/15/14 @ 01:58
yw$21pO<Esc>22i v <Esc>xjo<Esc>22i m <Esc>xgg3YG6pZZ

0 comments


#107 Tj / yrddy - Score: 36 - 08/19/14 @ 07:36
yw21PO<C-C><C-C>22i v <Esc>xGo<C-C><C-C>22i m <Esc>xVggy6PZZ

0 comments


#108 James / Dronak - Score: 37 - 09/12/13 @ 20:06
22i v <Esc>xi<CR><BS><Esc>yw21Po<Esc>22i m <Esc>x2k3Y2j6pZZ

0 comments


#109 Pradeep Kumar / pradeep6kumar - Score: 38 - 02/05/13 @ 05:03
yW$21pY2pk22R v <Esc>x:3<CR>22R m <Esc>xgg3YG6pZZ

0 comments


#110 Tobias Praetsch / tpraetsch - Score: 38 - 02/16/13 @ 21:23
O v <Esc>Go m <Esc><C-V>2k2by$21py2j6P:%s/\s$//<CR>ZZ

0 comments


#111 Jan Wedekind / wedesoft - Score: 38 - 05/15/13 @ 15:23
O v <Esc>Go m <Esc><C-V>1G0y21P3yy6P:%d<BS>s/ $<CR>:wq!<CR>

0 comments


#112 Piotr Śniegowski / PiotrSniegowski - Score: 38 - 06/06/13 @ 12:30
ye21PI<CR><Esc>k22i  v<Esc>0<Del>jo<Esc>22i  m<Esc>0<Del>y2kP5PZZ

0 comments


#113 Oliver Christ / 0liverChrist - Score: 38 - 09/25/13 @ 15:15
O v<Esc>21a  v<Esc>j21avim<Esc>o m<Esc>21a  m<Esc>Vkky6PZZ

0 comments


#114 Christopher Harrison / Xophmeister - Score: 39 - 02/06/13 @ 14:17
yw21PYpx:s/[^m]/ /g|t0|s/m/v/g|%y<CR>66PZZ

Xophmeister: That's weird: I did '6PZZ' after the ex-command, but it's been recorded as '66PZZ' :P

udioica: You had a hit-enter prompt. Any time you see a hit-enter prompt, Vim records the next stroke in duplicate (unless you actually hit enter...). It's a bug in Vim.

Xophmeister: Vim has bugs!?

zulolosi: Add a new issue with this problem in the web page: https://code.google.com/p/vim/issues/list

zulolosi: The problem was solved in vim 7.4.65, last version is 7.4.103 (11/27/2013). Thanks to @udioica. https://code.google.com/p/vim/source/detail?r=7f341db39d5bee0a9259a14a65e19bc9efa65417

5 comments


#115 ltn614 / ltn614 - Score: 39 - 09/23/15 @ 08:25
yw21PO <Esc>22av  <Esc>xxjo <Esc>22am  <Esc>xxgg3yy6PZZ

0 comments


#116 Adam Bell / adamgbell - Score: 40 - 02/25/13 @ 02:26
yw21PYpx:s/[^m]/ /g|t0<CR>:s/m/v/g<CR>:%y<CR>6PZZ

0 comments


#117 Jacob / jayekub - Score: 40 - 03/22/14 @ 23:09
d$22pO<Esc>22i v <Esc>xjo<Esc>22i m <Esc>xo<Esc>vgghd7pGddZZ

0 comments


#118 Felipe Jaramillo F / mrfelipe - Score: 40 - 04/02/14 @ 16:22
d$22pO<Esc>22i v <Esc>xjo<Esc>22i m <Esc>xo<Esc>vgghd7pGddZZ

0 comments


#119 brett / brettyukich - Score: 41 - 09/21/13 @ 21:55
O  v<Esc>Go  m<Esc><C-V>gg0xqq22pGo<Esc>q6@qdd:%s/^ //<CR>ZZ

0 comments


#120 Jesse Nazario / JesseNazario - Score: 52 - 04/18/13 @ 20:25
ye20o<Esc>2G22Pqqv0y3jpq5@qggD22a v <Esc>x6@q3G22a m <Esc>x6@qZZ

0 comments


#121 Justin Knag / justinknag - Score: 402 - 08/28/14 @ 15:17
yw21Pyy6pggO V<BS>vm<BS>  <C-C><C-C>v0y21Puvllllllhy$xl21puhhhhllllllllli  <C-C><C-C>jjkkllllllllllhllivjj<C-C><C-C>uhll0v$y$21puvhhhhhhy$21pkddkujklxxujju<C-R><C-R><C-R><C-R><C-R>ddO v<BS><BS><BS>jj<BS><BS><BS><C-C><C-C>hqa qkqsa<C-C><C-C>qqa kqqasq<C-C><C-C>qujkqa qkqai v q<BS><C-C><C-C>q21@ajjui  V<BS>v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v  v<C-C><C-C>yyj2pjjjk2pjjjkukkh:%s:3/v<CR>:3/v<CR>:3/v<CR>:<Up>/m/g<CR>:3,3s/v/m/g<CR>:noh<CR>2yyjjp2jp2jpj2jkpjjpjjpjdd$xkllkxklxkklxklxkklxklxklkxklxkklxklxkklxklxkkklxZZ

0 comments


Created by: zulolosi

121 active golfers, 390 entries

Leaderboard (lowest score wins):
20
#1 - Urtica dioica / udioica

02/04/2013 at 11:47PM

20
#2 - Victor Ramirez / virako

02/04/2013 at 11:56PM

20
#3 - Marcin Radomski / _dextero

02/05/2013 at 12:22AM

20
#4 - Steve Tjoa / stevetjoa

02/05/2013 at 06:17AM

20
#5 - Petro Тrouq / zulolosi

02/17/2013 at 08:46AM

20
#6 - Kai Yuan / kentyuan

02/24/2013 at 08:39PM

20
#7 - Michael Vitz / michaelvitz

02/25/2013 at 10:11AM

20
#8 - Trevor Powell / DoomedBunnies

03/04/2013 at 11:26PM

20
#9 - Kerson Hsiao / KersonHsiao

03/29/2013 at 03:37PM

20
#10 - Tyler / tylerbindon

04/01/2013 at 05:56PM

20
#11 - Chasetopher / chasetopherlee

04/27/2013 at 05:01AM

20
#12 - wushexu / wushexu

05/20/2013 at 05:46AM

20
#13 - Krzysztof Adamski / adamski_k

06/23/2013 at 11:10AM

20
#14 - moo goo / m00g000

07/02/2013 at 02:21PM

20
#15 - Bradd Szonye / bszonye

07/13/2013 at 01:59AM

20
#16 - _ky_ / ultimate_ky

08/14/2013 at 06:44AM

20
#17 - Pierre Bousquie / pierrebousquie

09/24/2013 at 12:18PM

20
#18 - Stefan Schmidt / stafue

12/06/2013 at 02:44PM

20
#19 - Yann Moisan / YannMoisan

01/03/2014 at 11:22AM

20
#20 - Marchand Paul-Valère / pvmarch

02/28/2014 at 12:55PM

20
#21 - Thomas GUILLORY / thomasguillory

02/28/2014 at 01:01PM

20
#22 - Matthew Draper / _matthewd

02/28/2014 at 05:06PM

20
#23 - John Braxler / braxler

04/04/2014 at 03:35PM

20
#24 - zmo / guyzmo

05/09/2014 at 09:08PM

20
#25 - kemar / le_kemar

08/29/2014 at 12:05PM

20
#26 - Johannes H. / neVexa

09/23/2014 at 03:19PM

20
#27 - Michael Daffin / James14790

10/17/2014 at 04:42PM

20
#28 - eBrnd / eBrnd

11/05/2014 at 10:07PM

20
#29 - Alexander Kazakov / volandkot

04/02/2015 at 07:17AM

20
#30 - pftb12345 / pftb12345

04/12/2015 at 12:28AM