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 131 remaining solutions by signing in and submitting your own entry
#132 gchain / @gchain7 - Score: 32 - 08/21/20 @ 17:48
:%s/\v(.*)(\{\{.*\}\})/\1"\2"<CR>ZZ

0 comments


Created by: @__dadav__

132 active golfers, 343 entries

Leaderboard (lowest score wins):
10
#91 - Kurtis D. Miller / @phdkurt

07/26/2020 at 06:55PM

10
#92 - Chris Thompson / @ctmusicnz

07/29/2020 at 05:36AM

10
#93 - Steve Frost / @FrostSteveFrost

08/02/2020 at 01:55AM

10
#94 - Terry Vogelsang / @terryvogelsang

08/03/2020 at 04:30PM

10
#95 - Kenny Nguyen / @KennyNg72375669

08/05/2020 at 06:24PM

10
#96 - Martin Bielik / @mabielik

08/06/2020 at 09:20PM

10
#97 - notadevCollins / @NotadevC

08/24/2020 at 01:32AM

10
#98 - Yasky / @Yaasky

09/01/2020 at 04:54PM

10
#99 - Muffin / @Muffin91707986

09/05/2020 at 09:24AM

10
#100 - Arijus / @argshook

10/16/2020 at 01:33PM

10
#101 - John Doe / @JohnDoe75830353

12/24/2020 at 02:01PM

11
#102 - dadav 🥀 / @__dadav__

07/15/2020 at 08:02PM

11
#103 - Remy_Clarke / @_Remy_Clarke_

07/16/2020 at 04:35PM

11
#104 - Julien Duc / @jduc_0

07/17/2020 at 08:41AM

11
#105 - dotvimrc / @dotvimrc1

07/20/2020 at 06:28AM

11
#106 - Ron-Shan,Chang / @highlupin

07/22/2020 at 02:24AM

11
#107 - drGsus / @drGsus

07/24/2020 at 05:22PM

11
#108 - GenericHardwareGamer / @GnrikHrdwrGamer

08/05/2020 at 09:00AM

11
#109 - Max Minaev / @max_minaev11

08/05/2020 at 07:05PM

11
#110 - Luis Rodriguez / @luisthecoder

08/20/2020 at 11:37AM

11
#111 - Nathan Hollows / @nathanhollows

08/21/2020 at 03:59AM

11
#112 - knoebber / @knoebber1

08/25/2020 at 07:07PM

11
#113 - lz2ggf / @lz2ggf

08/26/2020 at 07:39PM

11
#114 - Camilo A. Matajira / @CamiloMatajira

09/01/2020 at 07:51PM

11
#115 - Robert Verst / @r_verst

09/02/2020 at 11:13AM

11
#116 - mhb / @mhbvim

09/05/2020 at 05:29AM

11
#117 - Václav Pernička / @VaclavPernicka

09/05/2020 at 09:34PM

11
#118 - Ramūnas Musteikis / @RamnasMusteiki1

10/16/2020 at 01:33PM

11
#119 - roy twt / @roytwt1

10/18/2020 at 03:50PM

11
#120 - Nedko Nedkov / @NedkoNedkov6

12/15/2020 at 06:13PM