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

261 active golfers, 829 entries

Leaderboard (lowest score wins):
8
#31 - A A A / @37fatos

01/11/2021 at 12:08AM

8
#32 - Andreas Siegrist / @andreaszwei

01/28/2021 at 10:05PM

8
#33 - Jianfeng / @Jianfen22425058

02/02/2021 at 08:54AM

8
#34 - Fake Konto / @F4k3K0n70

02/13/2021 at 12:13AM

8
#35 - Tobia Bocchi / @BocchiTobia

02/19/2021 at 12:08PM

8
#36 - yaarrr / @v0lko

03/10/2021 at 12:33PM

8
#37 - der tanzbaer / @der_tanzbaer

03/10/2021 at 04:21PM

8
#38 - maxtong / @maxtong1987

03/19/2021 at 09:46AM

8
#39 - pomélux / @pomelux

03/29/2021 at 07:07PM

8
#40 - Lucas / @Lucas90143719

04/18/2021 at 03:25AM

8
#41 - Jaehong Park / @jaehongp

05/04/2021 at 11:57PM

8
#42 - axnyff / @axnyff

05/11/2021 at 09:06PM

8
#43 - Ray Dennis / @raysden

05/19/2021 at 09:06PM

8
#44 - Michael / @Michael62785035

05/27/2021 at 02:57PM

8
#45 - Arya Kumar / @SusSquirrel

05/27/2021 at 11:03PM

8
#46 - Mihail Orpheus / @mihailorpheuss

05/30/2021 at 10:03PM

8
#47 - vim_maxter / @MaxterVim

07/02/2021 at 10:42AM

8
#48 - AN HA / @quocAnHa

07/26/2021 at 11:09PM

8
#49 - Roman Privalov / @RomanPrivalov

08/23/2021 at 12:37AM

8
#50 - yancy / @yancy_dong

09/17/2021 at 01:54AM

8
#51 - jdfgjhsbd / @bli231957

10/02/2021 at 10:54AM

8
#52 - migoo / @migoo00668679

11/04/2021 at 07:53AM

8
#53 - 박기창 / @baggichang1

11/24/2021 at 04:07AM

8
#54 - 박세영 / @bagseyeong10

11/25/2021 at 08:18AM

8
#55 - 야통이 / @gonnanailedit

12/03/2021 at 02:31PM

8
#56 - unknown / @dongtaiwang1989

12/04/2021 at 02:26PM

8
#57 - ys / @SYS_0704

12/05/2021 at 08:01AM

8
#58 - 윤경호 / @GH_Yun2

12/05/2021 at 11:54AM

8
#59 - yxke / @_yxke

12/17/2021 at 01:54PM

8
#60 - ややお / @yayaoh

12/29/2021 at 06:02AM