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 9v0067a47b9200000000069f

Reordering properties

Arrange the CSS lines for the #topbar selector based on their complete line length, from shortest to longest.

Start file
#topbar {
  background
-image: url("images/abc.png");
  background
-position: 12px 13px;
  font
-size: 1px;
  left
: 36px;
  margin
-top: 10px;
  position
: relative;
  top
: 23px;
  vertical
-align: middle;
  width
: 200px;
}

#topbar .logo {
  top
: 50%;
  position
: absolute;
  left
: 20px;
  transform
: translateY(-50%);
  font
-size: 28px;
  font
-weight: bold;
  color
: #fff;
  text
-transform: uppercase;
  letter
-spacing: 1px;
}
End file
#topbar {
  top
: 23px;
  left
: 36px;
  width
: 200px;
  font
-size: 1px;
  margin
-top: 10px;
  position
: relative;
  vertical
-align: middle;
  background
-position: 12px 13px;
  background
-image: url("images/abc.png");
}

#topbar .logo {
  top
: 50%;
  left
: 20px;
  color
: #fff;
  font
-size: 28px;
  font
-weight: bold;
  position
: absolute;
  letter
-spacing: 1px;
  text
-transform: uppercase;
  transform
: translateY(-50%);
}

View Diff

2,4c2
<   background-image: url("images/abc.png");
<   background-position: 12px 13px;
<   font-size: 1px;
---
>   top: 23px;
5a4,5
>   width: 200px;
>   font-size: 1px;
8d7
<   top: 23px;
10c9,10
<   width: 200px;
---
>   background-position: 12px 13px;
>   background-image: url("images/abc.png");
15d14
<   position: absolute;
17c16
<   transform: translateY(-50%);
---
>   color: #fff;
20,21c19
<   color: #fff;
<   text-transform: uppercase;
---
>   position: absolute;
22a21,22
>   text-transform: uppercase;
>   transform: translateY(-50%);

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 197 remaining solutions by signing in and submitting your own entry
#198 rsh / @rei-shaholli - Score: 242 - 04/02/25 @ 04:39
j/top: 23<CR>ddkkkkkkkllllllp/left: 36<CR>ddkkkk$p/width:200<BS><BS><BS> 2<CR>dd?backend<BS><BS><BS>ground-i<CR>k$p/font-size: 1<CR>dd2kP2jjdd2kP3jdd2kP3jdd2kP2jdd2k$p/left: 2<CR>ddkP/color<CR>dd?tran<CR>k$puuddjjkkkkkkP/font-size: 28<CR>ddkkP/font-we<CR>ddjjkkkkP/<Esc>/lett<CR>ddkkk$pjjddkP:wq!<CR>

0 comments


Created by: @maharba6

198 active golfers, 831 entries

Leaderboard (lowest score wins):
39
#31 - Hessesian / @Hessesian

05/26/2025 at 08:48PM

39
#32 - tsui0 / @tsui0

06/19/2025 at 12:15AM

41
#33 - Luke Korn / @LukeKorn

04/19/2025 at 05:32PM

43
#34 - Sebastian Caicedo / @jsebdev

03/29/2025 at 07:39PM

43
#35 - Joel Eriksson / @OwariDa

04/07/2025 at 05:33AM

43
#36 - Michael Cuffaro / @maiku1008

04/27/2025 at 03:41PM

43
#37 - JustAnAverageGuy / @JustAnAverageGuy

05/14/2025 at 01:19PM

44
#38 - EMtLoD / @EnderMasterTheOverlordOfCode

04/16/2025 at 10:17AM

44
#39 - Charles Beauville / @charlesbvll

04/19/2025 at 10:38AM

44
#40 - Frank Benoit / @frankb_stgt

05/22/2025 at 08:06PM

45
#41 - bothyhead / @bothyhead

05/01/2025 at 10:05PM

45
#42 - kyle tilman / @ktilcu

05/14/2025 at 08:55PM

46
#43 - Nicolas Goudry / @nicolas-goudry

04/15/2025 at 05:01PM

48
#44 - satetheus-vimgolf / @SVimgolf

02/27/2025 at 10:08PM

48
#45 - _3tHeR_ / @3ther-joyboy

03/29/2025 at 09:48AM

48
#46 - Hemram Kumarapu / @H4-MM-3R

04/10/2025 at 10:44AM

49
#47 - Muhamed Spahić / @muhamed1ism

02/27/2025 at 09:25PM

50
#48 - Paroxyss / @Paroxyss

02/06/2025 at 10:03AM

50
#49 - abgalphbetz / @abgalphabetz

03/14/2025 at 07:20PM

50
#50 - Norgus / @Norgus

05/21/2025 at 03:43PM

52
#51 - Seva163 / @Seva163

04/06/2025 at 10:53AM

52
#52 - daviddcox / @daviddcox

04/26/2025 at 03:23PM

52
#53 - Leon Kacowicz / @leonkacowicz

05/05/2025 at 06:54PM

53
#54 - ArnaudValette / @ArnaudValette

05/16/2025 at 11:27PM

54
#55 - Ocisaac / @Ocisaac

04/02/2025 at 07:09PM

54
#56 - humble-hyphen / @humble-hyphen

04/04/2025 at 10:13AM

54
#57 - Gibson Starkweather / @boaf

05/24/2025 at 08:21PM

55
#58 - Mikhail f. Shiryaev / @Felixoid

02/26/2025 at 04:09PM

55
#59 - Andrey Rakhubovsky / @omnster

05/02/2025 at 09:42PM

56
#60 - Thiago M. de Oliveira / @thiagomoraisee

04/06/2025 at 07:07PM