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 587 remaining solutions by signing in and submitting your own entry
#588 Josh Gruber / @Jevitate - Score: 123 - 01/23/20 @ 02:26
i<BS><BS> <Down><Down><Right><Right><BS><BS>  <Up><BS><Down><Right><Right><BS><Down><Down><Right><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><Up><BS><Right><Right><Del><CR><Up> <Down><Left><Left><Left><Left><Right><Del><Left><Left><Up><Right><Right><Left><Left><Left><Up><Up><Down><Right><Right><Right><Down><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Del><BS><BS><BS><BS>s<Esc>:wq!<CR>

0 comments


Created by: @igrigorik

588 active golfers, 2633 entries

Leaderboard (lowest score wins):
31
#421 - Alykhan Kanji / @alykhank

08/17/2012 at 06:02PM

31
#422 - Joshua Travis / @jktravis

11/11/2012 at 02:47AM

31
#423 - Jordan Eldredge / @captbaritone

12/01/2012 at 08:43AM

31
#424 - Paul Roberts / @psxpau1

12/12/2012 at 10:42PM

31
#425 - XGOLFER / @vimg0lfer

01/04/2013 at 03:10AM

31
#426 - Terry Ma / @terry_ma

01/06/2013 at 04:58AM

31
#427 - Scott Myц / @ScottMuc

04/07/2013 at 04:36AM

31
#428 - Bitt Faulk / @bittfaulk

04/30/2013 at 05:26PM

31
#429 - Kathryn / @hartknyx

05/17/2013 at 02:16AM

31
#430 - Timothée Gauthier / @zmf_tim

07/13/2013 at 06:57AM

31
#431 - foo / @foo88832727

10/18/2013 at 03:58PM

31
#432 - Ben Lambeth / @azy2_ben

02/15/2014 at 06:55PM

31
#433 - gioanna miller / @gionnamiller

03/18/2014 at 11:26AM

31
#434 - Cavaillé Léo / @leoc892

04/09/2015 at 03:15AM

31
#435 - Ben Hill / @KaizenSoze70

05/09/2016 at 05:05PM

31
#436 - Brian Hall / @_bruab_

03/23/2017 at 02:58PM

31
#437 - Marius Jurgelenas / @MarenasLT

04/12/2018 at 12:29PM

31
#438 - Sachin Akula / @AkulaSachin

08/01/2018 at 05:11PM

31
#439 - Austin / @Austin57093958

01/23/2020 at 07:44PM

32
#440 - Mirosław Boruta / @m1rk00

12/28/2010 at 10:11PM

32
#441 - Christopher Suter / @cgs1019

12/29/2010 at 04:14AM

32
#442 - Cleve Pasarell / @clevepasarell

12/29/2010 at 09:23PM

32
#443 - Roman Mašek / @romario333

01/02/2011 at 06:48PM

32
#444 - Masashi Iizuka / @uochan

04/03/2011 at 07:23AM

32
#445 - Craig H. Anderson / @CootCraig

04/18/2011 at 03:23PM

32
#446 - Hervo Manuel / @Azema31

05/18/2011 at 07:11PM

32
#447 - Mikhail Korepanov / @PanyaKor

06/13/2011 at 12:55PM

32
#448 - keikun / @funkaloo

06/27/2011 at 03:38AM

32
#449 - Devon Blandin / @dblandin

08/06/2012 at 12:13AM

32
#450 - Kerry Burke / @kurver

09/18/2012 at 09:32AM