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

304 active golfers, 952 entries

Leaderboard (lowest score wins):
8
#91 - Aly Thobani / @alythobani

05/28/2024 at 09:32PM

8
#92 - Peppa Pig / @PeppaPi95550250

06/13/2024 at 12:58AM

9
#93 - Roger Stoltz / @rogsto1

07/15/2020 at 11:19PM

9
#94 - Dan / @dstein64

07/16/2020 at 12:08AM

9
#95 - Jon Krause / @jkrause314

07/16/2020 at 03:35AM

9
#96 - Saki Gw / @Sakigw

07/16/2020 at 06:29AM

9
#97 - Robberechts Arne / @ArneRobberechts

07/16/2020 at 10:38AM

9
#98 - Smylers / @Smylers2

07/16/2020 at 04:21PM

9
#99 - analogpixel / @analogp1xel

07/16/2020 at 07:21PM

9
#100 - Виталий Макаров / @avada_keda_bra

07/16/2020 at 09:49PM

9
#101 - garry quested / @GQuested

07/17/2020 at 10:54AM

9
#102 - Jonathan / @jonathannerat

07/17/2020 at 02:21PM

9
#103 - Richard Lowe / @b0ggyb33

07/17/2020 at 02:24PM

9
#104 - Leandro Lourenci / @lourenci

07/17/2020 at 05:20PM

9
#105 - Norbert / @mullno

07/17/2020 at 08:13PM

9
#106 - LCY / @Chooneh

07/18/2020 at 06:51AM

9
#107 - matteo / @matteo55169132

07/19/2020 at 06:32PM

9
#108 - Daniel Habib / @danielhvs

07/20/2020 at 04:01AM

9
#109 - speisz / @speiszc

07/20/2020 at 08:59PM

9
#110 - John Braxler / @braxler

07/21/2020 at 05:37PM

9
#111 - Benjamin Turner / @passionsplay

07/23/2020 at 04:15AM

9
#112 - Jason / @jason_eveleth

07/23/2020 at 06:43AM

9
#113 - Sergey Averkiev / @ExAnimoso

07/24/2020 at 06:43AM

9
#114 - Andy Yang / @yzwdroid

07/24/2020 at 04:20PM

9
#115 - Bitt Faulk / @bittfaulk

07/24/2020 at 06:46PM

9
#116 - Jacob Shomstein / @jshoms

07/25/2020 at 04:32AM

9
#117 - Jeff Cui / @jeffacce

07/27/2020 at 08:54AM

9
#118 - Rustem B. / @_rustemb

07/31/2020 at 12:44AM

9
#119 - merphant / @merphant

07/31/2020 at 08:08PM

9
#120 - TimMcGuire / @mcguire

08/03/2020 at 02:08PM