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

54 active golfers, 218 entries

Leaderboard (lowest score wins):
79
#31 - Ryo3110 / @r-3110

03/01/2025 at 05:59AM

80
#32 - Sandy1796ii / @Sandy1796ii

02/15/2025 at 10:25PM

80
#33 - Bruno Cunha / @bruncun

03/02/2025 at 10:58PM

81
#34 - chujDK / @chujDK

02/25/2025 at 02:32AM

81
#35 - Manuel Boldrer / @manuelboldrer

03/03/2025 at 09:57PM

84
#36 - vill / @villish

02/16/2025 at 05:50PM

84
#37 - teruko / @treebookboat

03/08/2025 at 03:36PM

85
#38 - rhysmaiden / @rhysmaiden

02/06/2025 at 03:49PM

92
#39 - Dylan / @dylancobb

03/03/2025 at 11:07PM

96
#40 - Andrew Sauber / @asauber

03/19/2025 at 02:30PM

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

02/16/2025 at 06:55PM

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

03/14/2025 at 02:27PM

106
#43 - kevincking1986 / @kevincking1986

03/23/2025 at 07:59PM

112
#44 - a94qu0402 / @a94qu0402

02/25/2025 at 03:21PM

117
#45 - Ava Gunn / @ava-gunn

03/01/2025 at 07:56PM

117
#46 - Oli / @olileung

03/14/2025 at 10:46AM

121
#47 - GregoryDi / @GregoryDi

03/01/2025 at 02:53PM

127
#48 - Alexey Kerpel / @Ekkana

03/16/2025 at 04:23PM

141
#49 - Posix / @po6ix

03/16/2025 at 09:15PM

154
#50 - Piyansh Kumar / @PiyanshK

02/25/2025 at 05:51AM

157
#51 - xuexcy / @xuexcy

03/23/2025 at 05:34PM

165
#52 - bqle / @bqle

02/22/2025 at 04:09PM

171
#53 - bilichijing / @bilichijing

03/19/2025 at 03:03PM

173
#54 - Michael Lisitsa / @michaellisitsa

02/16/2025 at 10:26AM