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 591074530b52f5000c000005

Nesting SASS

Move a block inside another block and indent it

Start file
.hero {
  background
-color: pink;
}

header
{
  border
-bottom: 2px solid #26BBB3;
}
End file
.hero {
  background
-color: pink;

  header
{
    border
-bottom: 2px solid #26BBB3;
 
}
}

View Diff

3d2
< }
5,6c4,6
< header {
<   border-bottom: 2px solid #26BBB3;
---
>   header {
>     border-bottom: 2px solid #26BBB3;
>   }
7a8
>

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 95 remaining solutions by signing in and submitting your own entry
#96 z_r_a / @z_r_a - Score: 26 - 10/22/20 @ 08:37
GVkk:norm I  <CR>VkkdkPO<BS><BS><Esc>ZZ

0 comments


Created by: @_bruab_

96 active golfers, 266 entries

Leaderboard (lowest score wins):
22
#91 - Luke DeWitt / @lanewalkerx

05/14/2017 at 05:12PM

23
#92 - python-tweepy / @python_tweepy

05/14/2017 at 09:56PM

23
#93 - nickGPT / @nickandbro

08/28/2024 at 02:52AM

24
#94 - Heron Medeiros / @heronmedeiros

05/08/2017 at 03:15PM

24
#95 - Ryan Coopersmith / @RyanCoopersmit1

06/04/2017 at 05:12PM

26
#96 - z_r_a / @z_r_a

10/22/2020 at 08:37AM