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

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

803 active golfers, 3742 entries

Solutions by @poeminlash:
16
#28 - Qing Liu / @poeminlash

08/06/2022 at 10:18PM

17
#>153 - Qing Liu / @poeminlash

08/06/2022 at 10:17PM

18
#>185 - Qing Liu / @poeminlash

08/06/2022 at 10:17PM

19
#>215 - Qing Liu / @poeminlash

08/06/2022 at 10:16PM

20
#>224 - Qing Liu / @poeminlash

08/06/2022 at 10:16PM

21
#>242 - Qing Liu / @poeminlash

08/06/2022 at 10:11PM

22
#>331 - Qing Liu / @poeminlash

06/29/2022 at 03:59AM

22
#>331 - Qing Liu / @poeminlash

08/06/2022 at 10:15PM

23
#>368 - Qing Liu / @poeminlash

06/29/2022 at 03:52AM

26
#>437 - Qing Liu / @poeminlash

06/29/2022 at 03:47AM

27
#>470 - Qing Liu / @poeminlash

06/29/2022 at 03:46AM

29
#>525 - Qing Liu / @poeminlash

06/29/2022 at 03:38AM

29
#>525 - Qing Liu / @poeminlash

06/29/2022 at 03:44AM

30
#>549 - Qing Liu / @poeminlash

06/29/2022 at 03:27AM

38
#>730 - Qing Liu / @poeminlash

06/29/2022 at 03:11AM