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

316 active golfers, 1007 entries

Leaderboard (lowest score wins):
10
#241 - chaotic / @laersn

11/04/2021 at 10:55AM

10
#242 - Michael Herring / @mayoroftuesday

12/10/2021 at 02:39PM

10
#243 - Jean George / @JeanGeo20504212

01/03/2022 at 09:54PM

10
#244 - rappenstein2 / @rappenstein2

01/14/2022 at 01:54PM

10
#245 - Mats Faugli / @matsfaugli

01/27/2022 at 01:41PM

10
#246 - albalitz / @_albalitz

04/29/2022 at 12:59PM

10
#247 - x03n046 / @x03n046

05/14/2022 at 02:49PM

10
#248 - Ilay Skutelsky / @ISkutelsky

08/02/2022 at 06:17AM

10
#249 - potatol33t / @potatol33t

08/07/2022 at 12:29PM

10
#250 - James / @Dronak

11/09/2022 at 05:17PM

10
#251 - steve / @steve35773420

11/20/2022 at 01:38PM

10
#252 - 권민재 / @gommj0611

04/07/2023 at 07:42AM

10
#253 - 0xf00ff00f / @0xf00ff00f

10/19/2023 at 02:45PM

10
#254 - 녹법칙 / @Rules_of_Green

04/08/2024 at 02:23PM

10
#255 - TANN1N / @TANN1N

04/12/2024 at 05:51AM

10
#256 - jiwon_kim / @Ji1WonKim

04/13/2024 at 12:01PM

10
#257 - Mystic / @aw0D5RUrdmxsylt

04/13/2024 at 04:57PM

10
#258 - LucidBreak / @LucidBreak

04/21/2024 at 11:10PM

10
#259 - Pablo Acuna / @pacuna

08/29/2024 at 12:42AM

10
#260 - Geon Woo Lee / @mystlee

03/27/2025 at 02:41AM

10
#261 - godjun123 / @godjun123

03/31/2025 at 07:08AM

11
#262 - dadav 🥀 / @__dadav__

07/15/2020 at 08:02PM

11
#263 - Remy_Clarke / @_Remy_Clarke_

07/16/2020 at 04:35PM

11
#264 - Julien Duc / @jduc_0

07/17/2020 at 08:41AM

11
#265 - dotvimrc / @dotvimrc1

07/20/2020 at 06:28AM

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

07/22/2020 at 02:24AM

11
#267 - drGsus / @drGsus

07/24/2020 at 05:22PM

11
#268 - GenericHardwareGamer / @GnrikHrdwrGamer

08/05/2020 at 09:00AM

11
#269 - Max Minaev / @max_minaev11

08/05/2020 at 07:05PM

11
#270 - Luis Rodriguez / @luisthecoder

08/20/2020 at 11:37AM