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

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

807 active golfers, 3763 entries

Solutions by @GolfVim11388:
22
#336 - Golf Vim / @GolfVim11388

06/30/2023 at 08:02PM

22
#>336 - Golf Vim / @GolfVim11388

06/30/2023 at 08:04PM

24
#>392 - Golf Vim / @GolfVim11388

06/30/2023 at 08:00PM

25
#>412 - Golf Vim / @GolfVim11388

06/30/2023 at 07:59PM

28
#>502 - Golf Vim / @GolfVim11388

06/30/2023 at 07:58PM