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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 624 remaining solutions by signing in and submitting your own entry
#625 Zac sliker / @Zacsliker - Score: 125 - 01/29/20 @ 16:29
<Left>d5w<Down>dwd<Left><Left><Left><Left>d5w<Down>dw<Left>d6wi<Up><Up><50-53>  convert tabs to spaces<CR>    strip all blank lines<CR>  and remove any trailing spaces<Esc>[201~<Down><Down><BS><BS><Esc>:wq!<CR>

0 comments


Created by: @igrigorik

625 active golfers, 2728 entries

Leaderboard (lowest score wins):
33
#481 - Darren Firth / @DarrenSFirth

02/20/2012 at 02:53AM

33
#482 - Vicente Sรกnchez / @froysm

09/09/2012 at 05:28AM

33
#483 - Drew Chandler / @drklutch

10/08/2012 at 11:19PM

33
#484 - Underhill Labs / @underhilllabs

10/29/2012 at 09:26PM

33
#485 - Pradeep Kumar ๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ฎ๐Ÿ‡ฑ / @pradeep6kumar

12/12/2012 at 01:21PM

33
#486 - scturtle / @scturtle

04/12/2013 at 07:55AM

33
#487 - Leif Bladt / @leifbladt

08/27/2013 at 09:07AM

33
#488 - David Tran / @everyzero

10/30/2013 at 08:12PM

33
#489 - Felipe Jaramillo F / @mrfelipe

04/18/2014 at 01:59PM

33
#490 - Rafee / @rafee_buet

07/22/2014 at 06:28PM

33
#491 - Almog / @almog

07/27/2014 at 01:48PM

33
#492 - CJ Avilla / @wizemanip

11/12/2014 at 05:25PM

33
#493 - David Willming / @wdialvmeo

07/17/2015 at 03:47AM

33
#494 - Mike Adams / @davis_cromwell

10/03/2015 at 01:26AM

33
#495 - Jon McClennon / @mcclennon19

12/21/2016 at 10:08AM

33
#496 - Daniel / @Daniel00288663

03/27/2017 at 11:11AM

33
#497 - Prithviraj Patil / @dummyprithviraj

12/03/2017 at 09:39PM

33
#498 - Geoff / @RealGeoffErwin

12/14/2017 at 09:07PM

33
#499 - sspan / @sspantz

07/06/2018 at 01:24AM

33
#500 - Vim Golfer / @VimGolfer6

09/06/2019 at 11:26AM

33
#501 - ใ‚†ใ‹๐Ÿ‘๐Ÿ‘๐Ÿ‘ / @yucao24hours

12/10/2019 at 04:41AM

33
#502 - lin / @l_shi1

01/31/2020 at 09:06AM

34
#503 - Soliman Sylvain / @sylvain_soliman

12/28/2010 at 10:07PM

34
#504 - Andrei Dragomir / @adragomir

01/01/2011 at 09:45PM

34
#505 - Cartney McLennon / @mepsi_pax

01/05/2011 at 10:01PM

34
#506 - Misha (Mike) Granin / @Granin

01/19/2011 at 04:19PM

34
#507 - Matthieu Honel / @ocus

01/26/2011 at 08:09AM

34
#508 - Beau Dacious / @nocash

03/16/2011 at 04:21PM

34
#509 - Frederik Mogensen / @fmogensen

03/31/2011 at 09:39AM

34
#510 - asdaskdjn / @asdaskdjn

06/09/2011 at 07:58AM