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):
9
#211 - rkrkrkwk / @rkrkrkwk

04/13/2024 at 01:39PM

9
#212 - 깔깔 / @dddh8204

04/13/2024 at 04:02PM

9
#213 - jhjhjhoh / @jhjhjhoh

04/14/2024 at 12:06PM

9
#214 - Kanmuruuruu / @Kanmuruuruu

04/15/2024 at 06:20AM

9
#215 - tk555 / @tk55513

05/04/2024 at 01:56PM

9
#216 - Hector Bjernersjö / @HectorBjernersjo

07/10/2024 at 12:32PM

9
#217 - Elliot Schemmel / @regulated

10/09/2024 at 09:23PM

9
#218 - diskeyd / @diskeyd

04/02/2025 at 09:55AM

10
#219 - Derek Schrock / @derekschrock

07/15/2020 at 09:05PM

10
#220 - Yannick / @Yannick88147038

07/16/2020 at 06:25PM

10
#221 - Ryan Brewer / @ryanbrwr

07/17/2020 at 03:44AM

10
#222 - vito / @vito49999722

07/19/2020 at 09:10AM

10
#223 - Anil Narayan / @AnilNarayan2013

07/24/2020 at 04:11AM

10
#224 - Kurtis D. Miller / @phdkurt

07/26/2020 at 06:55PM

10
#225 - Chris Thompson / @ctmusicnz

07/29/2020 at 05:36AM

10
#226 - Steve Frost / @FrostSteveFrost

08/02/2020 at 01:55AM

10
#227 - Terry Vogelsang / @terryvogelsang

08/03/2020 at 04:30PM

10
#228 - Kenny Nguyen / @KennyNg72375669

08/05/2020 at 06:24PM

10
#229 - Martin Bielik / @mabielik

08/06/2020 at 09:20PM

10
#230 - notadevCollins / @NotadevC

08/24/2020 at 01:32AM

10
#231 - Yāsky / @Yaasky

09/01/2020 at 04:54PM

10
#232 - Muffin / @Muffin91707986

09/05/2020 at 09:24AM

10
#233 - Arijus / @argshook

10/16/2020 at 01:33PM

10
#234 - John Doe / @JohnDoe75830353

12/24/2020 at 02:01PM

10
#235 - Pranshu Goyal / @PranshuGoyal

02/13/2021 at 09:07AM

10
#236 - Sergio Semedi / @SergioSemedi

04/11/2021 at 05:43PM

10
#237 - Daniel Qu / @danielq9871

05/03/2021 at 01:51PM

10
#238 - Joe Farnsworth / @JoeFarnsworth

06/22/2021 at 02:06AM

10
#239 - ever0de / @ever0de

06/23/2021 at 04:33AM

10
#240 - Mohammadreza Moradi / @mrmoradi1988

09/06/2021 at 07:32PM