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

332 active golfers, 1049 entries

Leaderboard (lowest score wins):
10
#241 - Pranshu Goyal / @PranshuGoyal

02/13/2021 at 09:07AM

10
#242 - Sergio Semedi / @SergioSemedi

04/11/2021 at 05:43PM

10
#243 - Daniel Qu / @danielq9871

05/03/2021 at 01:51PM

10
#244 - Joe Farnsworth / @JoeFarnsworth

06/22/2021 at 02:06AM

10
#245 - ever0de / @ever0de

06/23/2021 at 04:33AM

10
#246 - Mohammadreza Moradi / @mrmoradi1988

09/06/2021 at 07:32PM

10
#247 - chaotic / @laersn

11/04/2021 at 10:55AM

10
#248 - Michael Herring / @mayoroftuesday

12/10/2021 at 02:39PM

10
#249 - Jean George / @JeanGeo20504212

01/03/2022 at 09:54PM

10
#250 - rappenstein2 / @rappenstein2

01/14/2022 at 01:54PM

10
#251 - Mats Faugli / @matsfaugli

01/27/2022 at 01:41PM

10
#252 - albalitz / @_albalitz

04/29/2022 at 12:59PM

10
#253 - x03n046 / @x03n046

05/14/2022 at 02:49PM

10
#254 - Ilay Skutelsky / @ISkutelsky

08/02/2022 at 06:17AM

10
#255 - potatol33t / @potatol33t

08/07/2022 at 12:29PM

10
#256 - James / @Dronak

11/09/2022 at 05:17PM

10
#257 - steve / @steve35773420

11/20/2022 at 01:38PM

10
#258 - 권민재 / @gommj0611

04/07/2023 at 07:42AM

10
#259 - 0xf00ff00f / @0xf00ff00f

10/19/2023 at 02:45PM

10
#260 - 녹법칙 / @Rules_of_Green

04/08/2024 at 02:23PM

10
#261 - TANN1N / @TANN1N

04/12/2024 at 05:51AM

10
#262 - jiwon_kim / @Ji1WonKim

04/13/2024 at 12:01PM

10
#263 - Mystic / @aw0D5RUrdmxsylt

04/13/2024 at 04:57PM

10
#264 - LucidBreak / @LucidBreak

04/21/2024 at 11:10PM

10
#265 - Pablo Acuna / @pacuna

08/29/2024 at 12:42AM

10
#266 - Geon Woo Lee / @mystlee

03/27/2025 at 02:41AM

10
#267 - godjun123 / @godjun123

03/31/2025 at 07:08AM

10
#268 - jangseoyeon1114 / @jangseoyeon1114

10/14/2025 at 12:38PM

10
#269 - z-ae / @z-ae

10/21/2025 at 06:03PM

10
#270 - qoober1 / @qoober1

04/02/2026 at 05:40PM