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

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

790 active golfers, 3680 entries

Solutions by @molnija3d:
16
#43 - molnija3d / @molnija3d

07/05/2024 at 06:15PM

16
#>43 - molnija3d / @molnija3d

07/05/2024 at 06:21PM

17
#>171 - molnija3d / @molnija3d

07/05/2024 at 06:11PM

18
#>184 - molnija3d / @molnija3d

07/05/2024 at 06:09PM

19
#>214 - molnija3d / @molnija3d

07/05/2024 at 06:08PM

20
#>223 - molnija3d / @molnija3d

07/05/2024 at 08:05AM

21
#>243 - molnija3d / @molnija3d

07/05/2024 at 08:03AM

22
#>332 - molnija3d / @molnija3d

07/05/2024 at 08:01AM

23
#>364 - molnija3d / @molnija3d

07/05/2024 at 08:00AM

25
#>404 - molnija3d / @molnija3d

07/05/2024 at 07:59AM

26
#>436 - molnija3d / @molnija3d

07/05/2024 at 07:56AM

31
#>571 - molnija3d / @molnija3d

07/05/2024 at 07:54AM

52
#>760 - molnija3d / @molnija3d

07/05/2024 at 07:37AM