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

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

847 active golfers, 3967 entries

Solutions by @dcran108:
17
#190 - dcran108 / @dcran108

11/26/2025 at 09:43AM

18
#>199 - dcran108 / @dcran108

11/26/2025 at 09:41AM

18
#>199 - dcran108 / @dcran108

11/26/2025 at 09:42AM

19
#>231 - dcran108 / @dcran108

11/26/2025 at 09:40AM

21
#>267 - dcran108 / @dcran108

11/26/2025 at 09:37AM

24
#>413 - dcran108 / @dcran108

11/26/2025 at 09:35AM

28
#>530 - dcran108 / @dcran108

11/26/2025 at 09:34AM

29
#>558 - dcran108 / @dcran108

11/26/2025 at 09:34AM

30
#>581 - dcran108 / @dcran108

11/26/2025 at 09:30AM