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 by @migoohao:

Unlock 25 remaining solutions by signing in and submitting your own entry
Created by: @maharba6

244 active golfers, 1065 entries

Solutions by @migoohao:
31
#18 - migoohao / @migoohao

06/20/2025 at 03:54AM

35
#>20 - migoohao / @migoohao

06/20/2025 at 03:43AM

36
#>22 - migoohao / @migoohao

06/20/2025 at 03:40AM

37
#>24 - migoohao / @migoohao

06/20/2025 at 03:39AM

38
#>34 - migoohao / @migoohao

06/20/2025 at 03:35AM

39
#>39 - migoohao / @migoohao

06/20/2025 at 03:32AM

41
#>42 - migoohao / @migoohao

06/19/2025 at 02:39PM

42
#>42 - migoohao / @migoohao

06/20/2025 at 03:17AM

43
#>46 - migoohao / @migoohao

06/19/2025 at 01:47PM

46
#>56 - migoohao / @migoohao

06/20/2025 at 03:16AM

48
#>59 - migoohao / @migoohao

06/19/2025 at 01:45PM

50
#>65 - migoohao / @migoohao

06/19/2025 at 01:44PM

52
#>68 - migoohao / @migoohao

06/19/2025 at 01:40PM

53
#>69 - migoohao / @migoohao

06/19/2025 at 01:30PM

54
#>72 - migoohao / @migoohao

06/19/2025 at 01:10PM

58
#>81 - migoohao / @migoohao

06/19/2025 at 07:48AM

59
#>84 - migoohao / @migoohao

06/19/2025 at 06:16AM

60
#>85 - migoohao / @migoohao

06/19/2025 at 05:42AM

62
#>87 - migoohao / @migoohao

06/18/2025 at 06:16AM

62
#>87 - migoohao / @migoohao

06/19/2025 at 03:39AM

62
#>87 - migoohao / @migoohao

06/19/2025 at 05:40AM

70
#>107 - migoohao / @migoohao

06/19/2025 at 01:43PM

76
#>118 - migoohao / @migoohao

06/18/2025 at 06:03AM

101
#>176 - migoohao / @migoohao

06/18/2025 at 05:56AM

160
#>231 - migoohao / @migoohao

06/19/2025 at 03:36AM