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

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

804 active golfers, 3744 entries

Solutions by @majo_senf:
17
#137 - majo senf / @majo_senf

06/18/2019 at 11:42AM

18
#>185 - majo senf / @majo_senf

06/18/2019 at 11:32AM

19
#>214 - majo senf / @majo_senf

06/18/2019 at 11:31AM

20
#>222 - majo senf / @majo_senf

06/18/2019 at 11:30AM

21
#>241 - majo senf / @majo_senf

06/18/2019 at 11:29AM

22
#>329 - majo senf / @majo_senf

06/18/2019 at 11:26AM

24
#>388 - majo senf / @majo_senf

06/18/2019 at 11:26AM

26
#>435 - majo senf / @majo_senf

06/18/2019 at 11:25AM

27
#>469 - majo senf / @majo_senf

06/18/2019 at 11:24AM

29
#>523 - majo senf / @majo_senf

06/18/2019 at 11:23AM

30
#>548 - majo senf / @majo_senf

06/18/2019 at 11:20AM

35
#>686 - majo senf / @majo_senf

06/18/2019 at 11:17AM