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 5f0f5fbe280fbf000c233304

Add quotes to ansible playbook

You created an ansible playbook, but forgot to add quotes. Can you fix it?

Start file
---
- hosts: all
  vars:
    ssh_state: True
  tasks:
    - name: Manage openssh
      package:
        name: openssh
        state: {{ ssh_state }}
End file
---
- hosts: all
  vars:
    ssh_state: True
  tasks:
    - name: Manage openssh
      package:
        name: openssh
        state: "{{ ssh_state }}"

View Diff

9c9
<         state: {{ ssh_state }}
---
>         state: "{{ ssh_state }}"

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 260 remaining solutions by signing in and submitting your own entry
#261 Corentin Leriche / @LericheCorentin - Score: 47 - 01/03/23 @ 15:53
<Down><Down><Down><Down><Down><Down><Down><Down><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>i"<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>"<Esc>:wq!<CR>

0 comments


Created by: @__dadav__

261 active golfers, 829 entries

Leaderboard (lowest score wins):
9
#181 - dorianm / @dorianm

05/08/2022 at 12:24AM

9
#182 - Einn Seinn / @EinnSeinn

07/29/2022 at 07:37PM

9
#183 - Andrii Romashchenko / @aromarom64

10/25/2022 at 09:50AM

9
#184 - Omar Alawadhi / @OmarAla59544225

10/28/2022 at 07:11PM

10
#185 - Derek Schrock / @derekschrock

07/15/2020 at 09:05PM

10
#186 - Yannick / @Yannick88147038

07/16/2020 at 06:25PM

10
#187 - Ryan Brewer / @ryanbrwr

07/17/2020 at 03:44AM

10
#188 - vito / @vito49999722

07/19/2020 at 09:10AM

10
#189 - Anil Narayan / @AnilNarayan2013

07/24/2020 at 04:11AM

10
#190 - Kurtis D. Miller / @phdkurt

07/26/2020 at 06:55PM

10
#191 - Chris Thompson / @ctmusicnz

07/29/2020 at 05:36AM

10
#192 - Steve Frost / @FrostSteveFrost

08/02/2020 at 01:55AM

10
#193 - Terry Vogelsang / @terryvogelsang

08/03/2020 at 04:30PM

10
#194 - Kenny Nguyen / @KennyNg72375669

08/05/2020 at 06:24PM

10
#195 - Martin Bielik / @mabielik

08/06/2020 at 09:20PM

10
#196 - notadevCollins / @NotadevC

08/24/2020 at 01:32AM

10
#197 - Yāsky / @Yaasky

09/01/2020 at 04:54PM

10
#198 - Muffin / @Muffin91707986

09/05/2020 at 09:24AM

10
#199 - Arijus / @argshook

10/16/2020 at 01:33PM

10
#200 - John Doe / @JohnDoe75830353

12/24/2020 at 02:01PM

10
#201 - Pranshu Goyal / @PranshuGoyal

02/13/2021 at 09:07AM

10
#202 - Sergio Semedi / @SergioSemedi

04/11/2021 at 05:43PM

10
#203 - Daniel Qu / @danielq9871

05/03/2021 at 01:51PM

10
#204 - Joe Farnsworth / @JoeFarnsworth

06/22/2021 at 02:06AM

10
#205 - ever0de / @ever0de

06/23/2021 at 04:33AM

10
#206 - Mohammadreza Moradi / @mrmoradi1988

09/06/2021 at 07:32PM

10
#207 - chaotic / @laersn

11/04/2021 at 10:55AM

10
#208 - Michael Herring / @mayoroftuesday

12/10/2021 at 02:39PM

10
#209 - Jean George / @JeanGeo20504212

01/03/2022 at 09:54PM

10
#210 - rappenstein2 / @rappenstein2

01/14/2022 at 01:54PM