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

260 active golfers, 827 entries

Leaderboard (lowest score wins):
9
#121 - Андрей / @appomsk

08/18/2020 at 10:59AM

9
#122 - Ilya Komarov ⚛️ / @ilya_komar0ff

08/19/2020 at 12:08AM

9
#123 - serici / @serici

08/20/2020 at 11:06AM

9
#124 - Łukasz Kadłubowski / @LAKadlubowski

08/21/2020 at 01:44AM

9
#125 - RockerZZY / @rocker_zzy

08/24/2020 at 01:04PM

9
#126 - fenn.stefan@gmail.com / @FennStefan

08/25/2020 at 02:15PM

9
#127 - 刘宏亮 / @AkeyCoy

09/12/2020 at 12:02PM

9
#128 - Ceda EI / @ceda_ei

09/29/2020 at 02:48PM

9
#129 - Brendan Schaenzer / @bschaenzer

10/02/2020 at 01:45AM

9
#130 - mstronam / @mstronam

10/02/2020 at 11:01AM

9
#131 - Gytis Vinclovas / @GytisVinclovas

10/16/2020 at 01:35PM

9
#132 - noam teyssier / @noamteyssier

10/16/2020 at 05:37PM

9
#133 - Leland Paul Kusmer / @lelandpaul

10/23/2020 at 02:21PM

9
#134 - moh ayaya / @AyayaMoh

11/07/2020 at 09:27PM

9
#135 - hepebexè / @hepebexe

11/30/2020 at 10:09PM

9
#136 - chocolate / @chocola81394123

12/03/2020 at 03:06AM

9
#137 - Björn Struckmeier / @BjrnStruckmeie1

01/07/2021 at 01:38PM

9
#138 - 蔡徐坤真是爱吃屎 / @Hashub7

01/21/2021 at 09:12AM

9
#139 - 영훈 / @odjfnrtm

02/14/2021 at 03:48AM

9
#140 - ArtemisZX / @ArtemisCZX

02/14/2021 at 09:17AM

9
#141 - 김범준 / @kmbmjn

02/17/2021 at 01:33AM

9
#142 - SwordSwordSwordBird / @SwordSwordBird

02/21/2021 at 06:30AM

9
#143 - hamb / @hamb88140219

02/21/2021 at 08:49AM

9
#144 - b0wman / @b0wman_x00

02/27/2021 at 02:00PM

9
#145 - Kha Nguyen / @__ngtrongkha

03/01/2021 at 09:43AM

9
#146 - Paul Adlene / @AdlenePaul

03/15/2021 at 09:40AM

9
#147 - pikjes / @pikjes2

03/20/2021 at 06:14PM

9
#148 - Jackmarocks / @jackmarocks

03/23/2021 at 06:24PM

9
#149 - Baptiste Nicolet / @b_nicolet

04/06/2021 at 03:37PM

9
#150 - Russell Helmstedter / @RHelmstedter

04/07/2021 at 05:40PM