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
#61 - nd183 / @nd1832

03/07/2022 at 02:17PM

8
#62 - Julio C. Pompa Puente / @JCPompaPuente

03/19/2022 at 01:46AM

8
#63 - 준현 / @xpexpe2

03/31/2022 at 10:26AM

8
#64 - mold mild / @mild_mold

04/02/2022 at 12:36PM

8
#65 - yeom / @yeomhuigeon

04/05/2022 at 04:19AM

8
#66 - 심우현 / @tmvlem5671

04/05/2022 at 10:49AM

8
#67 - 지형 유 / @O_hr_good7

04/05/2022 at 04:35PM

8
#68 - 벚꽃 / @beojkkoch3

04/07/2022 at 01:04PM

8
#69 - Ji_Hyeong / @PlzstopIT7

04/11/2022 at 02:47PM

8
#70 - William / @williamwjh

04/11/2022 at 05:35PM

8
#71 - 김가윤 / @qweru38010687

04/13/2022 at 10:55AM

8
#72 - co_hyo / @co_hyo

04/13/2022 at 05:46PM

8
#73 - CONNOR / @CONNOR32315543

04/14/2022 at 02:42PM

8
#74 - 황다민 / @ghkdekals

04/15/2022 at 04:31PM

8
#75 - lll / @skdjd01719

04/15/2022 at 04:34PM

8
#76 - 구이공 / @CdP60ouZ6hhcHMG

04/16/2022 at 11:53PM

8
#77 - cho / @cho_liaa

04/17/2022 at 07:37AM

8
#78 - Max / @Max17868626

04/22/2022 at 06:12AM

8
#79 - russellzhaomao / @russellzhaomao

05/23/2022 at 07:38AM

8
#80 - Alex / @AlexanderHeatl2

07/06/2022 at 09:00PM

8
#81 - Pheimors / @pheimors

10/02/2022 at 12:49PM

8
#82 - Janzen / @__Coos

10/06/2022 at 08:50AM

8
#83 - Himanshu Tank / @himanshutank75

11/03/2022 at 04:20AM

8
#84 - Jan Sturm / @JanSturm77

11/17/2022 at 05:01PM

8
#85 - Marco Meinardi / @chino_meinardi

12/30/2022 at 09:05PM

9
#86 - Roger Stoltz / @rogsto1

07/15/2020 at 11:19PM

9
#87 - Dan / @dstein64

07/16/2020 at 12:08AM

9
#88 - Jon Krause / @jkrause314

07/16/2020 at 03:35AM

9
#89 - Saki Gw / @Sakigw

07/16/2020 at 06:29AM

9
#90 - Robberechts Arne / @ArneRobberechts

07/16/2020 at 10:38AM