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

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

808 active golfers, 3767 entries

Solutions by @_zvjos:
17
#153 - josh / @_zvjos

06/17/2022 at 12:11PM

18
#>186 - josh / @_zvjos

06/17/2022 at 12:03PM

19
#>216 - josh / @_zvjos

06/17/2022 at 12:00PM

19
#>216 - josh / @_zvjos

06/17/2022 at 12:02PM

20
#>225 - josh / @_zvjos

06/17/2022 at 11:57AM

21
#>243 - josh / @_zvjos

06/17/2022 at 11:55AM

22
#>333 - josh / @_zvjos

06/17/2022 at 11:49AM

24
#>391 - josh / @_zvjos

06/17/2022 at 11:46AM

26
#>440 - josh / @_zvjos

06/17/2022 at 11:45AM

28
#>502 - josh / @_zvjos

06/17/2022 at 11:42AM

28
#>502 - josh / @_zvjos

06/17/2022 at 11:44AM

33
#>643 - josh / @_zvjos

06/17/2022 at 11:38AM