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

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

841 active golfers, 3949 entries

Solutions by @adityakamath255:
17
#189 - adityakamath255 / @adityakamath255

11/22/2025 at 05:03AM

18
#>198 - adityakamath255 / @adityakamath255

11/22/2025 at 05:00AM

19
#>230 - adityakamath255 / @adityakamath255

11/22/2025 at 04:59AM

20
#>240 - adityakamath255 / @adityakamath255

11/22/2025 at 04:53AM

21
#>266 - adityakamath255 / @adityakamath255

11/22/2025 at 04:49AM

21
#>266 - adityakamath255 / @adityakamath255

11/22/2025 at 04:52AM

23
#>390 - adityakamath255 / @adityakamath255

11/22/2025 at 04:47AM

25
#>434 - adityakamath255 / @adityakamath255

11/22/2025 at 04:46AM

26
#>466 - adityakamath255 / @adityakamath255

11/22/2025 at 04:45AM

58
#>816 - adityakamath255 / @adityakamath255

11/22/2025 at 04:40AM

59
#>816 - adityakamath255 / @adityakamath255

11/21/2025 at 04:45PM