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

787 active golfers, 3665 entries

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

04/02/2022 at 10:52PM

28
#>489 - shahanavaz m / @shahanavazm

04/02/2022 at 11:07PM

28
#>489 - shahanavaz m / @shahanavazm

04/03/2022 at 01:14AM

30
#>539 - shahanavaz m / @shahanavazm

04/02/2022 at 10:48PM

31
#>567 - shahanavaz m / @shahanavazm

02/12/2022 at 05:21AM

32
#>590 - shahanavaz m / @shahanavazm

02/19/2022 at 01:33AM

33
#>628 - shahanavaz m / @shahanavazm

04/02/2022 at 10:46PM

39
#>716 - shahanavaz m / @shahanavazm

01/16/2024 at 11:38PM

43
#>740 - shahanavaz m / @shahanavazm

02/12/2022 at 05:06AM

47
#>752 - shahanavaz m / @shahanavazm

02/12/2022 at 04:54AM

93
#>778 - shahanavaz m / @shahanavazm

01/16/2024 at 11:37PM