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

97 active golfers, 388 entries

Leaderboard (lowest score wins):
24
#1 - Peppa Pig / @PeppaPigSg

02/21/2025 at 02:56AM

24
#2 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

02/24/2025 at 11:54PM

24
#3 - Hugh Davenport / @hughdavenport

02/25/2025 at 09:46PM

27
#4 - maharba6 / @maharba6

04/07/2025 at 12:24PM

31
#5 - vanniuner / @vanniuner

02/24/2025 at 10:47AM

31
#6 - shooker2012 / @shooker2012

03/19/2025 at 09:31AM

31
#7 - jeffreymrussell / @jeffreymrussell

03/24/2025 at 12:19PM

35
#8 - jonas-grobe / @jonas-grobe

04/06/2025 at 10:58AM

36
#9 - hamakichitaro / @hamakichitaro

03/02/2025 at 03:04AM

37
#10 - Yordan Boikov / @yboikov

04/13/2025 at 02:55PM

38
#11 - Petro Тrouq / @zulolosi

02/08/2025 at 07:40PM

38
#12 - John Braxler / @braxler

02/10/2025 at 01:18PM

38
#13 - rasputins / @rasputins

02/15/2025 at 03:05AM

38
#14 - Joe Reddington / @joereddington

02/24/2025 at 08:23PM

38
#15 - Arnold Samuel Chan / @arnoldschan

03/27/2025 at 09:45AM

38
#16 - SpiridonDumitru / @SpiridonDumitru

04/01/2025 at 09:55AM

38
#17 - quadam / @quadam

04/07/2025 at 03:44PM

38
#18 - Dmitrii / @tdragon

04/13/2025 at 11:33AM

39
#19 - "Smylers" / @Smylers2

02/07/2025 at 02:39PM

39
#20 - MatFriend / @MatFriend

03/25/2025 at 03:31AM

39
#21 - Nico Ambrosini / @nambrosini

03/27/2025 at 09:59PM

43
#22 - Sebastian Caicedo / @jsebdev

03/29/2025 at 07:39PM

43
#23 - Joel Eriksson / @OwariDa

04/07/2025 at 05:33AM

46
#24 - Nicolas Goudry / @nicolas-goudry

04/15/2025 at 05:01PM

48
#25 - satetheus-vimgolf / @SVimgolf

02/27/2025 at 10:08PM

48
#26 - _3tHeR_ / @3ther-joyboy

03/29/2025 at 09:48AM

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

04/10/2025 at 10:44AM

49
#28 - Muhamed Spahić / @muhamed1ism

02/27/2025 at 09:25PM

50
#29 - Paroxyss / @Paroxyss

02/06/2025 at 10:03AM

50
#30 - abgalphbetz / @abgalphabetz

03/14/2025 at 07:20PM