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 423 remaining solutions by signing in and submitting your own entry
#424 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

424 active golfers, 1544 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