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

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

736 active golfers, 3339 entries

Solutions by @shahanavazm:
28
#458 - shahanavaz m / @shahanavazm

04/02/2022 at 10:52PM

28
#>458 - shahanavaz m / @shahanavazm

04/02/2022 at 11:07PM

28
#>458 - shahanavaz m / @shahanavazm

04/03/2022 at 01:14AM

30
#>503 - shahanavaz m / @shahanavazm

04/02/2022 at 10:48PM

31
#>530 - shahanavaz m / @shahanavazm

02/12/2022 at 05:21AM

32
#>553 - shahanavaz m / @shahanavazm

02/19/2022 at 01:33AM

33
#>588 - shahanavaz m / @shahanavazm

04/02/2022 at 10:46PM

39
#>672 - shahanavaz m / @shahanavazm

01/16/2024 at 11:38PM

43
#>695 - shahanavaz m / @shahanavazm

02/12/2022 at 05:06AM

47
#>706 - shahanavaz m / @shahanavazm

02/12/2022 at 04:54AM

93
#>729 - shahanavaz m / @shahanavazm

01/16/2024 at 11:37PM