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 47 remaining solutions by signing in and submitting your own entry
#48 Michael Lisitsa / @michaellisitsa - Score: 173 - 02/16/25 @ 10:26
kjjkdd9jkP<Esc>:set rn<BS>elate<BS>ivenumber!<CR>8kdd7jPjkkkddpjjjkkkkkkddkjjou<Esc>upjkkkkddkjjpj5kddkjjjpkkkddpjjjjjjjjjjjjjjdd4jPddpkkddpjjkkkkkkkkdd4k4j4jpddjkkPjkkkddpjjkkkkddp<Esc>:w<CR><Esc>:wq<CR>

0 comments


Created by: @maharba6

48 active golfers, 187 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

31
#4 - vanniuner / @vanniuner

02/24/2025 at 10:47AM

31
#5 - shooker2012 / @shooker2012

03/19/2025 at 09:31AM

35
#6 - maharba6 / @maharba6

03/19/2025 at 10:44AM

36
#7 - hamakichitaro / @hamakichitaro

03/02/2025 at 03:04AM

38
#8 - Petro Тrouq / @zulolosi

02/08/2025 at 07:40PM

38
#9 - John Braxler / @braxler

02/10/2025 at 01:18PM

38
#10 - rasputins / @rasputins

02/15/2025 at 03:05AM

38
#11 - Joe Reddington / @joereddington

02/24/2025 at 08:23PM

39
#12 - "Smylers" / @Smylers2

02/07/2025 at 02:39PM

48
#13 - satetheus-vimgolf / @SVimgolf

02/27/2025 at 10:08PM

48
#14 - SpiridonDumitru / @SpiridonDumitru

03/11/2025 at 02:19PM

49
#15 - Muhamed Spahić / @muhamed1ism

02/27/2025 at 09:25PM

50
#16 - Paroxyss / @Paroxyss

02/06/2025 at 10:03AM

50
#17 - abgalphbetz / @abgalphabetz

03/14/2025 at 07:20PM

55
#18 - Mikhail f. Shiryaev / @Felixoid

02/26/2025 at 04:09PM

57
#19 - KNAKAJIMA2 / @KNAKAJIMA2

03/22/2025 at 08:21AM

64
#20 - Jonas Krumm / @Dedphish

03/16/2025 at 04:31PM

65
#21 - George Mills / @jorge-mells

03/09/2025 at 05:49PM

65
#22 - Philip Brand / @PhilipB316

03/14/2025 at 11:43PM

73
#23 - Kamal Aghayev / @agayev169

03/01/2025 at 07:01PM

75
#24 - sehoon900811 / @sehoon900811

03/21/2025 at 02:54PM

77
#25 - Triver1 / @Triver1

03/09/2025 at 01:21PM

79
#26 - Ryo3110 / @r-3110

03/01/2025 at 05:59AM

80
#27 - Sandy1796ii / @Sandy1796ii

02/15/2025 at 10:25PM

80
#28 - Bruno Cunha / @bruncun

03/02/2025 at 10:58PM

81
#29 - chujDK / @chujDK

02/25/2025 at 02:32AM

81
#30 - Manuel Boldrer / @manuelboldrer

03/03/2025 at 09:57PM