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

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

788 active golfers, 3670 entries

Solutions by @bounce114:
17
#177 - bounce114 / @bounce114

12/01/2024 at 10:04AM

18
#>183 - bounce114 / @bounce114

12/01/2024 at 10:02AM

19
#>213 - bounce114 / @bounce114

12/01/2024 at 10:01AM

21
#>243 - bounce114 / @bounce114

12/01/2024 at 09:50AM

22
#>331 - bounce114 / @bounce114

12/01/2024 at 08:02AM

22
#>331 - bounce114 / @bounce114

12/01/2024 at 08:04AM

22
#>331 - bounce114 / @bounce114

12/01/2024 at 09:36AM

24
#>382 - bounce114 / @bounce114

12/01/2024 at 07:57AM

26
#>434 - bounce114 / @bounce114

12/01/2024 at 07:57AM

29
#>518 - bounce114 / @bounce114

12/01/2024 at 07:50AM

31
#>569 - bounce114 / @bounce114

12/01/2024 at 07:48AM

33
#>629 - bounce114 / @bounce114

12/01/2024 at 07:48AM

43
#>744 - bounce114 / @bounce114

12/01/2024 at 07:45AM

48
#>755 - bounce114 / @bounce114

12/01/2024 at 01:23AM

52
#>758 - bounce114 / @bounce114

12/01/2024 at 01:41AM