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 183 remaining solutions by signing in and submitting your own entry
#184 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

184 active golfers, 751 entries

Leaderboard (lowest score wins):
91
#121 - Dane D / @DaneD3D

04/02/2025 at 09:31PM

91
#122 - Christopher Jensen / @cjensen5011

04/18/2025 at 09:05PM

92
#123 - Dylan / @dylancobb

03/03/2025 at 11:07PM

93
#124 - HADIOUCHE Azouaou / @Thoro-las

03/28/2025 at 04:16PM

93
#125 - Eli Tan / @eliedrian

05/09/2025 at 08:18AM

95
#126 - bennetthunter10 / @bennetthunter10

04/30/2025 at 02:52PM

96
#127 - Andrew Sauber / @asauber

03/19/2025 at 02:30PM

96
#128 - DeniseBryson / @DeniseBryson

04/21/2025 at 06:23PM

96
#129 - . / @bigsmoke3567

06/15/2025 at 09:18PM

97
#130 - ak@developer / @Ajay-056

04/19/2025 at 03:58PM

99
#131 - Bart Dubbeldam / @holodorum

05/29/2025 at 08:46AM

101
#132 - lovebigwei / @lovebigwei

04/15/2025 at 08:43AM

102
#133 - Yohans Hailu kasaw / @yohans-kasaw

02/16/2025 at 06:55PM

102
#134 - winter-loo / @winter-loo

03/31/2025 at 10:20PM

102
#135 - turtlefetus / @turtlefetus

05/23/2025 at 03:54AM

103
#136 - Thor Döör / @throwpedro

03/14/2025 at 02:27PM

103
#137 - nlampetis / @nlampetis

04/24/2025 at 07:44AM

104
#138 - Dev / @DevSharma19

04/20/2025 at 01:26AM

104
#139 - Andoitz Campo / @andoitzcp

05/08/2025 at 10:23PM

106
#140 - kevincking1986 / @kevincking1986

03/23/2025 at 07:59PM

106
#141 - cenan ozen / @cenan

04/05/2025 at 03:10PM

106
#142 - jvegar / @jvegar

04/21/2025 at 09:20PM

106
#143 - Sjur B. / @Apostrophel

05/23/2025 at 08:01PM

106
#144 - Rojohn / @SrVariable

05/24/2025 at 12:01AM

107
#145 - Guakk / @ANewProfile

04/15/2025 at 12:32PM

109
#146 - Pieter-Jan Tuytschaever / @ptuytsch

03/28/2025 at 06:42PM

110
#147 - Staffan Sandberg / @Sandsten

03/28/2025 at 05:20PM

112
#148 - a94qu0402 / @a94qu0402

02/25/2025 at 03:21PM

114
#149 - Andrii / @JustLinuxUser

04/25/2025 at 11:06PM

114
#150 - rellarda / @rellarda

04/27/2025 at 05:44PM