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 266 remaining solutions by signing in and submitting your own entry
#267 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__

267 active golfers, 845 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

9
#185 - e_e / @eleloi

02/13/2023 at 10:18PM

9
#186 - Jakob Föger / @drvolcano86

02/17/2023 at 12:57PM

9
#187 - Иван / @wansmer

04/21/2023 at 06:42AM

10
#188 - Derek Schrock / @derekschrock

07/15/2020 at 09:05PM

10
#189 - Yannick / @Yannick88147038

07/16/2020 at 06:25PM

10
#190 - Ryan Brewer / @ryanbrwr

07/17/2020 at 03:44AM

10
#191 - vito / @vito49999722

07/19/2020 at 09:10AM

10
#192 - Anil Narayan / @AnilNarayan2013

07/24/2020 at 04:11AM

10
#193 - Kurtis D. Miller / @phdkurt

07/26/2020 at 06:55PM

10
#194 - Chris Thompson / @ctmusicnz

07/29/2020 at 05:36AM

10
#195 - Steve Frost / @FrostSteveFrost

08/02/2020 at 01:55AM

10
#196 - Terry Vogelsang / @terryvogelsang

08/03/2020 at 04:30PM

10
#197 - Kenny Nguyen / @KennyNg72375669

08/05/2020 at 06:24PM

10
#198 - Martin Bielik / @mabielik

08/06/2020 at 09:20PM

10
#199 - notadevCollins / @NotadevC

08/24/2020 at 01:32AM

10
#200 - Yāsky / @Yaasky

09/01/2020 at 04:54PM

10
#201 - Muffin / @Muffin91707986

09/05/2020 at 09:24AM

10
#202 - Arijus / @argshook

10/16/2020 at 01:33PM

10
#203 - John Doe / @JohnDoe75830353

12/24/2020 at 02:01PM

10
#204 - Pranshu Goyal / @PranshuGoyal

02/13/2021 at 09:07AM

10
#205 - Sergio Semedi / @SergioSemedi

04/11/2021 at 05:43PM

10
#206 - Daniel Qu / @danielq9871

05/03/2021 at 01:51PM

10
#207 - Joe Farnsworth / @JoeFarnsworth

06/22/2021 at 02:06AM

10
#208 - ever0de / @ever0de

06/23/2021 at 04:33AM

10
#209 - Mohammadreza Moradi / @mrmoradi1988

09/06/2021 at 07:32PM

10
#210 - chaotic / @laersn

11/04/2021 at 10:55AM