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

03/07/2022 at 02:17PM

8
#62 - Julio CPP / @jcaesarpp

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 / @Kee__no

12/30/2022 at 09:05PM

8
#86 - Mohammad Apel Mahmod / @apel_mahmod

09/21/2023 at 03:56PM

8
#87 - h_yxxun__.6 / @kimhyunseoo

04/12/2024 at 05:50PM

8
#88 - lazely / @lazely

04/14/2024 at 06:36AM

8
#89 - Lennart / @lennartack

04/17/2024 at 08:52AM

8
#90 - xiaoao1024 / @xiaoao1024

05/10/2024 at 08:57AM