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

787 active golfers, 3665 entries

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

05/25/2022 at 02:03AM

18
#>182 - russellzhaomao / @russellzhaomao

05/25/2022 at 02:01AM

19
#>212 - russellzhaomao / @russellzhaomao

05/25/2022 at 02:00AM

20
#>220 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:58AM

21
#>237 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:56AM

24
#>380 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:51AM

25
#>401 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:51AM

26
#>428 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:49AM

27
#>460 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:47AM

29
#>515 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:45AM

33
#>628 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:41AM

39
#>716 - russellzhaomao / @russellzhaomao

05/25/2022 at 01:36AM