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

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

756 active golfers, 3492 entries

Solutions by @weixiaobaoL:
17
#159 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:48AM

17
#>159 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 05:46AM

18
#>172 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:47AM

19
#>201 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:47AM

21
#>230 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:46AM

24
#>368 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:45AM

25
#>388 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:44AM

25
#>388 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:44AM

26
#>415 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:41AM

28
#>472 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:40AM

29
#>498 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:40AM

31
#>547 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:39AM

32
#>570 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:37AM

34
#>640 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:35AM

38
#>687 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:34AM

39
#>689 - weixiaobaoL / @weixiaobaoL

01/03/2024 at 03:33AM