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

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

847 active golfers, 3967 entries

Solutions by @NostraDavid:
16
#55 - NostraDavid / @NostraDavid

02/24/2026 at 11:22PM

17
#>192 - NostraDavid / @NostraDavid

02/24/2026 at 11:21PM

18
#>200 - NostraDavid / @NostraDavid

02/24/2026 at 11:20PM

19
#>231 - NostraDavid / @NostraDavid

02/24/2026 at 11:19PM

20
#>241 - NostraDavid / @NostraDavid

02/24/2026 at 11:17PM

21
#>269 - NostraDavid / @NostraDavid

02/24/2026 at 11:16PM

23
#>391 - NostraDavid / @NostraDavid

02/24/2026 at 11:14PM

34
#>712 - NostraDavid / @NostraDavid

02/24/2026 at 11:11PM

58
#>821 - NostraDavid / @NostraDavid

02/24/2026 at 11:08PM