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 @liberalbias:

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

816 active golfers, 3795 entries

Solutions by @liberalbias:
17
#70 - Charles Gordon / @liberalbias

08/23/2012 at 06:17AM

19
#>214 - Charles Gordon / @liberalbias

08/23/2012 at 06:17AM

20
#>222 - Charles Gordon / @liberalbias

08/23/2012 at 06:15AM

21
#>236 - Charles Gordon / @liberalbias

08/23/2012 at 06:12AM

21
#>236 - Charles Gordon / @liberalbias

08/23/2012 at 06:14AM

22
#>303 - Charles Gordon / @liberalbias

08/23/2012 at 06:03AM

22
#>303 - Charles Gordon / @liberalbias

08/23/2012 at 06:11AM

23
#>351 - Charles Gordon / @liberalbias

08/23/2012 at 06:03AM

24
#>381 - Charles Gordon / @liberalbias

08/23/2012 at 05:47AM

24
#>381 - Charles Gordon / @liberalbias

08/23/2012 at 06:02AM

25
#>403 - Charles Gordon / @liberalbias

08/23/2012 at 05:41AM

25
#>403 - Charles Gordon / @liberalbias

08/23/2012 at 05:46AM

28
#>493 - Charles Gordon / @liberalbias

08/23/2012 at 05:33AM

31
#>564 - Charles Gordon / @liberalbias

08/23/2012 at 05:32AM

32
#>595 - Charles Gordon / @liberalbias

08/23/2012 at 05:25AM