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

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

809 active golfers, 3775 entries

Solutions by @bounce114:
17
#179 - bounce114 / @bounce114

12/01/2024 at 10:04AM

18
#>188 - bounce114 / @bounce114

12/01/2024 at 10:02AM

19
#>218 - bounce114 / @bounce114

12/01/2024 at 10:01AM

21
#>250 - bounce114 / @bounce114

12/01/2024 at 09:50AM

22
#>341 - bounce114 / @bounce114

12/01/2024 at 08:02AM

22
#>341 - bounce114 / @bounce114

12/01/2024 at 08:04AM

22
#>341 - bounce114 / @bounce114

12/01/2024 at 09:36AM

24
#>393 - bounce114 / @bounce114

12/01/2024 at 07:57AM

26
#>446 - bounce114 / @bounce114

12/01/2024 at 07:57AM

29
#>531 - bounce114 / @bounce114

12/01/2024 at 07:50AM

31
#>583 - bounce114 / @bounce114

12/01/2024 at 07:48AM

33
#>644 - bounce114 / @bounce114

12/01/2024 at 07:48AM

43
#>765 - bounce114 / @bounce114

12/01/2024 at 07:45AM

48
#>776 - bounce114 / @bounce114

12/01/2024 at 01:23AM

52
#>779 - bounce114 / @bounce114

12/01/2024 at 01:41AM