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

667 active golfers, 3009 entries

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

06/17/2022 at 12:11PM

18
#>137 - josh / @_zvjos

06/17/2022 at 12:03PM

19
#>166 - josh / @_zvjos

06/17/2022 at 12:00PM

19
#>166 - josh / @_zvjos

06/17/2022 at 12:02PM

20
#>173 - josh / @_zvjos

06/17/2022 at 11:57AM

21
#>188 - josh / @_zvjos

06/17/2022 at 11:55AM

22
#>269 - josh / @_zvjos

06/17/2022 at 11:49AM

24
#>316 - josh / @_zvjos

06/17/2022 at 11:46AM

26
#>361 - josh / @_zvjos

06/17/2022 at 11:45AM

28
#>413 - josh / @_zvjos

06/17/2022 at 11:42AM

28
#>413 - josh / @_zvjos

06/17/2022 at 11:44AM

33
#>537 - josh / @_zvjos

06/17/2022 at 11:38AM