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

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

803 active golfers, 3742 entries

Solutions by @jackliusr:
16
#7 - jackliusr / @jackliusr

01/14/2016 at 05:46AM

17
#>114 - jackliusr / @jackliusr

01/14/2016 at 05:42AM

19
#>214 - jackliusr / @jackliusr

01/14/2016 at 05:41AM

21
#>240 - jackliusr / @jackliusr

01/14/2016 at 05:38AM

22
#>323 - jackliusr / @jackliusr

01/14/2016 at 05:37AM

24
#>387 - jackliusr / @jackliusr

01/14/2016 at 05:34AM

26
#>434 - jackliusr / @jackliusr

01/14/2016 at 05:33AM

27
#>468 - jackliusr / @jackliusr

01/14/2016 at 05:32AM

28
#>491 - jackliusr / @jackliusr

01/14/2016 at 05:20AM

30
#>545 - jackliusr / @jackliusr

01/14/2016 at 05:14AM

32
#>599 - jackliusr / @jackliusr

01/14/2016 at 05:09AM