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

Whitespace, empty lines and tabs

Convert tabs to spaces, strip empty lines and trailing whitespace.

Start file
        convert tabs to spaces

                strip all blank lines

       
and remove any trailing spaces  
End file
  convert tabs to spaces
    strip all blank lines
 
and remove any trailing spaces

View Diff

1,5c1,3
<       convert tabs to spaces
<
<               strip all blank lines
<
<       and remove any trailing spaces  
---
>   convert tabs to spaces
>     strip all blank lines
>   and remove any trailing spaces

Solutions by @GitNick:

Unlock 12 remaining solutions by signing in and submitting your own entry
Created by: @igrigorik

808 active golfers, 3767 entries

Solutions by @GitNick:
17
#73 - Nicholas Clark / @GitNick

09/19/2012 at 06:43PM

19
#>212 - Nicholas Clark / @GitNick

09/19/2012 at 06:27PM

20
#>221 - Nicholas Clark / @GitNick

09/19/2012 at 06:17PM

21
#>234 - Nicholas Clark / @GitNick

09/19/2012 at 06:14PM

22
#>303 - Nicholas Clark / @GitNick

09/19/2012 at 05:53PM

23
#>350 - Nicholas Clark / @GitNick

09/19/2012 at 05:28PM

24
#>380 - Nicholas Clark / @GitNick

09/19/2012 at 05:26PM

25
#>401 - Nicholas Clark / @GitNick

09/19/2012 at 03:32AM

26
#>426 - Nicholas Clark / @GitNick

09/19/2012 at 03:27AM

27
#>460 - Nicholas Clark / @GitNick

09/19/2012 at 03:22AM

30
#>542 - Nicholas Clark / @GitNick

09/19/2012 at 02:50AM

31
#>561 - Nicholas Clark / @GitNick

09/19/2012 at 02:41AM