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

441 active golfers, 1632 entries

Leaderboard (lowest score wins):
15
#211 - Casey W Crites / @caseycrites

01/01/2011 at 02:48AM

15
#212 - Vincent Isambart / @vincentisambart

01/01/2011 at 03:08AM

15
#213 - Joe Auricchio / @jauricchio

01/01/2011 at 08:05AM

15
#214 - Lee Jarvis / @lee_jarvis

01/01/2011 at 01:56PM

15
#215 - Su. / @0moMi

01/01/2011 at 04:48PM

15
#216 - Soliman Sylvain / @sylvain_soliman

01/01/2011 at 05:20PM

15
#217 - Aurélien Delahaye / @alkove

01/01/2011 at 07:18PM

15
#218 - William Shackleton / @wshackleton

01/01/2011 at 10:59PM

15
#219 - El Jacko / @mrjackinc

01/02/2011 at 05:09AM

15
#220 - Nick Klauer / @klauern

01/02/2011 at 02:29PM

15
#221 - Rob Ciaccio / @RobertoCalavera

01/03/2011 at 09:24AM

15
#222 - Olivier Verdier / @OlivierVerdier

01/03/2011 at 10:46PM

15
#223 - Kornél Lugosi / @Coornail

01/08/2011 at 10:43AM

15
#224 - Przemysław Pawełczyk / @przemoc86

01/15/2011 at 10:55PM

15
#225 - theShockwaveRider / @tswr

01/20/2011 at 09:12AM

15
#226 - SirVer / @SirVerII

01/23/2011 at 02:29PM

15
#227 - gruolin / @gruolin

11/05/2011 at 08:37AM

15
#228 - Adrian Roston / @akroston

02/08/2012 at 04:33AM

15
#229 - 無ん垢の叫び / @john_ababa

02/24/2012 at 06:31AM

15
#230 - q_revert / @q_revert

07/19/2012 at 11:13AM

15
#231 - Nathan / @boysetsfrog

10/21/2012 at 12:59AM

15
#232 - curist / @curist

07/09/2013 at 08:24AM

15
#233 - cj / @cj01101

08/08/2013 at 01:35PM

15
#234 - Andrew Crites / @ExplosionPills

09/14/2013 at 04:01AM

15
#235 - James / @Dronak

09/26/2013 at 06:03PM

15
#236 - Jesse Nazario / @jessenzr

10/16/2013 at 07:53PM

15
#237 - gary.klindt@googlema / @garstekli

11/26/2013 at 04:17PM

15
#238 - Omer Lachish / @rauchy

03/11/2014 at 01:45PM

15
#239 - RB / @powerage88

03/21/2014 at 11:51PM

15
#240 - Jacob Branaugh / @jacobbranaugh

06/25/2014 at 11:14PM