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 4d1e634e509d6e19d8000081

Shebangs for all

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

Start file
#!/usr/bin/ruby

#!/usr/bin/env ruby

#!/usr/local/bin/python

#!/usr/python
End file
#!/usr/bin/env ruby

#!/usr/bin/env python

View Diff

1,2d0
< #!/usr/bin/ruby
< 
5,7c3
< #!/usr/local/bin/python
< 
< #!/usr/python
---
> #!/usr/bin/env python

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 337 remaining solutions by signing in and submitting your own entry
#338 w1zeman1p / wizemanip - Score: 19 - 05/12/14 @ 18:36
2dd<C-V>t ly2jvtppjdGZZ

0 comments


#339 Rafee / rafee_buet - Score: 19 - 07/22/14 @ 16:10
2ddj.Ebibin/env <Esc>ZZ

0 comments


#340 かしゅーなっつ@修行中 / kashew_nuts - Score: 19 - 08/02/14 @ 06:46
2ddj.Ebibin/env <Esc>ZZ

0 comments


#341 Tj / yrddy - Score: 19 - 08/19/14 @ 03:03
djfbvtryjdjwww"0pZZ

0 comments


#342 João Pedro Foscarini / FoscariniJoao - Score: 19 - 06/09/15 @ 13:28
d<Down>Gd<Up>fld2wwaenv <Esc>ZZ

0 comments


#343 Gerald Tilma / GeraldTilma - Score: 19 - 10/17/15 @ 20:58
2ddyf jjPldtpj2ddZZ

0 comments


#344 Kyouma / kyoumaJohn - Score: 19 - 10/14/16 @ 19:10
2ddYjp2frcwp<C-N><Esc>jdGZZ

0 comments


#345 Mike Bruno / themike_bruno - Score: 19 - 10/23/16 @ 05:19
2ddj.Ebibin/env <Esc>ZZ

0 comments


#346 Mark Brody / _markbrody - Score: 19 - 03/24/17 @ 14:59
djYjpj7wd$khPld4$ZZ

0 comments


#347 Jonas Sunde V / sunde_v - Score: 19 - 08/04/17 @ 17:32
2ddj.Ebibin/env <Esc>ZZ

0 comments


#348 Harsh Kumar / datsleepyguy - Score: 19 - 09/09/17 @ 15:09
2dd<C-V>t ly2jvtppjdGZZ

0 comments


#349 Kevin Hamer / khamer - Score: 20 - 01/05/11 @ 14:39
djjdj/p<CR>ibin/env <Esc>ZZ

0 comments


#350 drio / drio - Score: 20 - 01/11/11 @ 13:46
djjdj/p<CR>ibin/env <Esc>ZZ

0 comments


#351 Avinash Baliga / avinashbaliga - Score: 20 - 04/16/11 @ 02:16
2ddyf jjPld4f/j2ddZZ

0 comments


#352 Ian McCowan / valrus - Score: 20 - 05/29/11 @ 21:32
dj"ayf 2jctp<C-R>a<Esc>jdjZZ

0 comments


#353 Torben Rasmussen / rasmustorben - Score: 20 - 08/29/11 @ 17:35
VjdyW2jPlv$bhdj2ddZZ

0 comments


#354 deadghost / deadghosttt - Score: 20 - 01/12/12 @ 10:53
2ddj.j2wabin/env <Esc>ZZ

0 comments


#355 Fernando Axel Ellis / Axel_Ellis - Score: 20 - 10/02/13 @ 21:50
2ddv6e<Right>y2jv7ep<Down>2ddZZ

0 comments


#356 n.st / 0013901644043f9 - Score: 20 - 10/06/13 @ 04:26
2ddv/ <CR>y2jv6wpj2ddZZ

0 comments


#357 Martin Chabot / martinosis - Score: 20 - 12/10/13 @ 16:37
2ddj.jfpibin/env <Esc>ZZ

0 comments


#358 Patrick Pitoscia / Patrick03960431 - Score: 20 - 08/06/14 @ 02:34
2ddfbytrG2f/p2G2ddZZ

0 comments


#359 luffy / raxcoi - Score: 20 - 06/06/15 @ 20:45
d2d2lyf 2j<C-V>3f/PjdGZZ

0 comments


#360 Nicola Coretti / NiCoRetti - Score: 20 - 06/04/16 @ 08:46
2ddvf y3Gvfphpj2ddZZ

0 comments


#361 Gurukandhamoorthi / Gurukandhamoor1 - Score: 20 - 07/13/17 @ 08:58
djYpfrfrcwp<C-N><Esc>jdGO<Esc>ZZ

0 comments


#362 Corbin Simpson / corbinsimpson - Score: 21 - 01/02/11 @ 14:41
djYjpWc$python<Esc>j0dGZZ

0 comments


#363 James Freed / JamesTFreed - Score: 21 - 02/03/12 @ 02:22
djyt jjPldtpi <Esc><CR>2ddZZ

0 comments


#364 Joseph J. Piché / jjpiche - Score: 21 - 08/25/12 @ 02:10
2ddvWhyjjv/p<CR>hpj2ddZZ

0 comments


#365 Nicolas Friedli / NicolasFriedli - Score: 21 - 10/30/12 @ 14:14
d2dyy<Down>p/ru<CR>cwp<C-N><Down><Esc>dGZZ

0 comments


#366 Boer Asten / astenboer - Score: 21 - 11/08/12 @ 02:58
2ddYjpj$byekbPlDjdGZZ

0 comments


#367 Alex Hammel / AlexJHammel - Score: 21 - 12/23/12 @ 18:32
djyjPjjWCpython<Esc>jdGZZ

0 comments


#368 Zach Kemp / zvksf - Score: 21 - 12/19/13 @ 17:28
2dd4G.fldtbfpienv <Esc>ZZ

0 comments


#369 Mikael Saltzman / MikaelSaltzman - Score: 21 - 10/04/15 @ 01:33
2ddvWhyjjv/p<CR>hpj2ddZZ

0 comments


#370 Franco Lazzarino / flazz - Score: 22 - 01/04/11 @ 21:06
2ddj2dd/p<CR>ibin/env <Esc>ZZ

0 comments


#371 bestform / bestform - Score: 22 - 02/12/11 @ 22:32
2ddyypJJdtpbdwj2ddO<Esc>ZZ

0 comments


#372 Mathias Fussenegger / mfussenegger - Score: 22 - 06/06/11 @ 21:30
d2dyyjp$bCpython<Esc>jdGZZ

0 comments


#373 Domon / Domon - Score: 22 - 09/11/12 @ 09:57
2ddj2dd/p<CR>ibin/env <Esc>ZZ

0 comments


#374 Bart of Denver / bartofdenver - Score: 22 - 08/12/13 @ 22:27
2Dj4DyypO<Esc>2WCpython<Esc>ZZ

0 comments


#375 shugen / shugeno - Score: 22 - 04/13/15 @ 20:11
2ddj2ddjfpibin/env <Esc>ZZ

0 comments


#376 ggdGiBork:3^[:wq / CopperBadger - Score: 22 - 10/06/15 @ 02:18
djyf 3Gpdtpi <Esc>0xjdG<Esc>ZZ

0 comments


#377 Guillaume Bonnoron / gbonnoron - Score: 23 - 01/01/11 @ 16:15
2dd2j17x2ky15l2jPj2ddZZ

0 comments


#378 Jeroen / teranex - Score: 23 - 03/01/11 @ 20:20
2ddjjfldf/f/aenv <Esc>jdGZZ

0 comments


#379 Gonzih / Gonzih - Score: 23 - 03/24/11 @ 21:03
dd.G..flvtpcbin/env <Esc>ZZ

0 comments


#380 Shannon / shannonskipper - Score: 23 - 11/26/11 @ 04:51
2dd3j2ddfldwxwaenv <Esc>:x<CR>

0 comments


#381 Tyler Breisacher / tbreisacher - Score: 23 - 08/25/12 @ 08:33
2ddvt yjjPld4t/r j2ddZZ

0 comments


#382 Michael / patheticpat - Score: 23 - 12/16/12 @ 19:23
2dd2yyPjjWCpython<Esc>jdGZZ

0 comments


#383 Brian Besmanoff / BrianBesmanoff - Score: 23 - 07/26/13 @ 02:01
dj2jdGkyyjpWcwpython<Esc>ZZ

0 comments


#384 wilddog64 / chengkai318 - Score: 23 - 12/17/13 @ 20:39
2dd:4,5d<CR>fldf/;aenv <Esc>ZZ

0 comments


#385 Alessandro Lisander / wuiimu - Score: 23 - 01/05/14 @ 02:05
:v/nv/d<CR>YpWCpython<Esc>O<Esc>ZZ

0 comments


#386 Almog / almog - Score: 23 - 03/11/14 @ 13:38
d2dYjjP2frCpython<Esc>jdGZZ

0 comments


#387 Felipe Jaramillo F / mrfelipe - Score: 23 - 04/02/14 @ 13:53
2dd2yyPjjWCpython<Esc>jdGZZ

0 comments


#388 johan wester / wester87 - Score: 24 - 11/12/11 @ 14:42
d2d/l<CR>dw<Del>fpienv <Esc>jd2d<Esc>ZZ

0 comments


#389 Jyun-Fan Tsai / fakecolor - Score: 24 - 02/04/12 @ 13:41
2ddYjpA<BS><BS><BS><BS>python<Esc>j3ddZZ

0 comments


#390 Jason Wolf / zephyr_wolf - Score: 24 - 11/08/12 @ 13:24
:v/e/d<CR>Yo<Esc>p2frCpython<Esc>ZZ

0 comments


#391 Nico Kruger / nicok_za - Score: 24 - 11/09/12 @ 12:01
d2dyy2jP$bcwpython<Esc>jdGZZ

0 comments


#392 Eric Andres / eric_m_andres - Score: 24 - 12/05/12 @ 18:01
2ddjdGyyPo<Esc>WWcwpython<Esc>ZZ

0 comments


#393 Oliver Christ / 0liverChrist - Score: 24 - 09/25/13 @ 16:00
2ddyyjp<End>ciwpython<Esc>j3ddZZ

0 comments


#394 Sam Burk / smwbk - Score: 24 - 12/23/13 @ 03:02
:v/e/d<CR>yyo<Esc>pWcwpython<Esc>ZZ

0 comments


#395 Vincent Dumoulin / dumoulinv - Score: 24 - 11/23/14 @ 05:31
dj2jdGkyyjp$ciwpython<Esc>ZZ

0 comments


#396 d1uckym d1uckym / d1uckym - Score: 24 - 02/16/15 @ 06:53
2D2YP3jdG/ru<CR>cwpython<Esc>ZZ

0 comments


#397 quiggy🌹 / quiggy - Score: 24 - 05/19/16 @ 19:41
:v/e/d<CR>Yo<Esc>p2frCpython<Esc>ZZ

0 comments


#398 Brandon Height / Lask0x - Score: 24 - 08/08/17 @ 17:07
2dd2Yjp6wdwapython<Esc>jdGZZ

0 comments


#399 Daniel de Vries / devries_d - Score: 24 - 02/14/18 @ 16:04
2dd2j3wdwx2wienv <Esc>j2ddZZ

0 comments


#400 Jan B. / bracki - Score: 25 - 01/03/11 @ 16:49
2ddjjjdGC<C-X><C-L><Esc>bcwpython<Esc>:x<CR>

0 comments


#401 David Wilemski / davidwilemski - Score: 25 - 06/09/11 @ 18:37
dd.G..flvtpcbin/env <Esc>:wq<CR>

0 comments


#402 Joe T / h2g2guy - Score: 25 - 11/01/13 @ 05:31
2frienv <Esc>l*Cpython<Esc>jd4dZZ

0 comments


#403 ren / wxoc - Score: 25 - 02/25/14 @ 10:06
2dd:4<CR>2ddfldiwxwwienv <Esc>ZZ

0 comments


#404 Charles Neill / ccneill - Score: 25 - 05/01/14 @ 02:09
dd.jjwwdefpienv <Esc><Down>d2d:wq<CR>

0 comments


#405 Justin Knag / justinknag - Score: 25 - 08/30/14 @ 00:04
2ddYjpfr;cwpython<C-C><C-C>j3ddZZ

0 comments


#406 Jonas Ng / jnshey - Score: 25 - 05/16/15 @ 09:46
:v/ /d<CR>yyo<Esc>p$ciwpython<Esc>ZZ

0 comments


#407 Thongrapee / kulaspa2 - Score: 25 - 07/25/16 @ 05:43
4jfldwxf/aenv <Esc>jdd.gg..ZZ

0 comments


#408 Stefan Sonski / stefansonski - Score: 25 - 08/23/16 @ 15:24
:v/env/d<CR>Yo<Esc>pWcwpython<Esc>ZZ

0 comments


#409 Viswanath Sivakumar / viswanathgs - Score: 26 - 08/30/12 @ 15:30
dd.yyo<Esc>p/ru<CR>cwpython<Esc>jdGZZ

0 comments


#410 Sanchez Benjamin / Sanchezsky - Score: 27 - 11/11/11 @ 12:20
d<Down>YpO<Esc>/ruby<CR>cwpython<CR><Esc>dG:x<CR>

0 comments


#411 John Hilliard / praetorian - Score: 27 - 01/31/12 @ 04:03
Vjxjjwwldwxwaenv <Esc>j2dd<Esc>:wq<CR>

0 comments


#412 Bjorn / bjorn_248 - Score: 27 - 11/15/13 @ 21:08
:v/env/d<CR>YpO<Esc>G$ciwpython<Esc>ZZ

0 comments


#413 Dorian Scheidt / DorianListens - Score: 27 - 02/25/15 @ 05:02
2ddj2.2.yyp2frcwpython<Esc>O<Esc>ZZ

0 comments


#414 Roger Spencer / RojSpencer - Score: 27 - 03/12/15 @ 23:16
:v/env/d<CR>yypO<Esc>WWcwpython<Esc>ZZ

0 comments


#415 Nick Nisi / nicknisi - Score: 29 - 05/05/12 @ 03:17
Vjdyyjp2frcwpython<Esc>jVjjd<Esc>:wq<CR>

0 comments


#416 Adam Licht / aal85255 - Score: 29 - 10/22/13 @ 03:38
djjdGyyo<Esc>pwwwwwwcwpython<Esc>:wq<CR>

0 comments


#417 Bryan Kendall / bkendall - Score: 30 - 06/09/11 @ 16:01
2ddyyo<Esc>pwwwwwwdwapython<Esc><CR>4ddZZ

0 comments


#418 sorami / boredoms - Score: 31 - 05/01/11 @ 00:02
ddddyyjpjdGwwwwwwcwpython<C-C><C-C>:wq<CR>

0 comments


#419 Alpa_akm / Alpa_akm - Score: 35 - 07/28/17 @ 11:10
2ddyyPo<Down><End><Esc>dw<Left><Left>Dapython<Esc><Down>dG<Esc>:wq<BS><CR>:q<CR>

0 comments


#420 TimWolla / TimWolla - Score: 37 - 03/13/14 @ 21:48
:%s~r/p~r/bin/env p~<CR>:v/env/d<CR>i<CR><Esc>:wq<CR>

0 comments


#421 Lorenz / lorenzk - Score: 39 - 01/10/11 @ 21:15
2ddjjPuudd<Esc>u2ddyyjjPj3ddfrfrcwpython<Esc>ZZ

0 comments


#422 Sven Koesling / McSvenster - Score: 244 - 08/20/12 @ 14:39
:<Up>%s/\(.*\W\)\(\w\+\)/#\/usr\/bin\/env \2/<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>!<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right> | sort! u | %s/^$/d | %s/\n/<C-V><CR><C-V><CR>/<CR><CR>u:<Up><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><CR>:%s/^$/d | %s/\n/^M^M/<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><CR>uu:<Up><Up><Up><Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS>/<CR><CR>kkk4ddZZ

0 comments


Created by: jamesconroyfinn

422 active golfers, 1538 entries

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

05/28/2012 at 08:23PM

11
#2 - Federico Galassi / federicogalassi

05/31/2012 at 06:11AM

11
#3 - Tim Chase / gumnos

06/03/2012 at 12:33AM

11
#4 - John Piasetzki / jpiasetz

07/13/2012 at 06:34AM

11
#5 - Kate / Arohanui

10/30/2012 at 11:53AM

11
#6 - Tom Cammann / tea_sea

11/14/2012 at 10:59AM

11
#7 - Adam Bell / adamgbell

03/21/2013 at 06:44PM

11
#8 - Marco Hinz / _mhinz_

05/22/2013 at 12:02PM

11
#9 - Petro Тrouq / zulolosi

06/25/2013 at 03:44AM

11
#10 - Bradd Szonye / bszonye

07/13/2013 at 09:00AM

11
#11 - William Snyders / iam2391212

07/16/2013 at 04:43PM

11
#12 - Matt Cook / mattcook08

07/16/2013 at 09:08PM

11
#13 - ———đίxίє—flαтlίиє——— / _dixie_flatline

07/19/2013 at 05:40PM

11
#14 - Dom Armstrong / dom_cycleface

08/26/2013 at 10:31AM

11
#15 - Joshua Appelman / JoshuaAppelman

12/21/2013 at 10:13PM

11
#16 - Yann Moisan / YannMoisan

01/01/2014 at 09:45PM

11
#17 - Jon Evans / burmasauce

01/29/2014 at 08:45PM

11
#18 - Marchand Paul-Valère / pvmarch

03/07/2014 at 08:51PM

11
#19 - vimgolf copycat / vimgolf_copycat

03/08/2014 at 04:04PM

11
#20 - John Braxler / braxler

03/27/2014 at 06:58PM

11
#21 - ZorgroZ / ZorgroZ

04/13/2014 at 09:34PM

11
#22 - Peeby Thirtyone / peeby31

05/11/2014 at 11:32AM

11
#23 - John Meisner / jmeisned

06/26/2014 at 03:56AM

11
#24 - Kelsey Ando / d_chan42

07/09/2014 at 07:07PM

11
#25 - playalong / playwithit42

07/15/2014 at 01:14PM

11
#26 - MonkeyBrains ISP / monkeybrainsnet

07/26/2014 at 08:19AM

11
#27 - Ben Haines / bhainesva

08/07/2014 at 11:14PM

11
#28 - Mattias Fransson / azzidoos

09/17/2014 at 08:40PM

11
#29 - Roberto Alegro / robertoaall

11/30/2014 at 05:19AM

11
#30 - Bellator nobilis / BNobilis

12/16/2014 at 09:32PM