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

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

666 active golfers, 2999 entries

Solutions by @russellzhaomao:
17
#131 - russellzhaomao / @russellzhaomao

05/25/2022 at 02:03AM

18
#>136 - russellzhaomao / @russellzhaomao

05/25/2022 at 02:01AM

19
#>165 - russellzhaomao / @russellzhaomao

05/25/2022 at 02:00AM

20
#>172 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:58AM

21
#>187 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:56AM

24
#>315 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:51AM

25
#>335 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:51AM

26
#>360 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:49AM

27
#>387 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:47AM

29
#>434 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:45AM

33
#>536 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:41AM

39
#>611 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:36AM