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):
9
#151 - Michele Gargiulo / @michele_gargi

04/15/2021 at 04:31PM

9
#152 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:57PM

9
#153 - ⚫ hgtp://Shifor πŸ› οΈ / @shifor_gnome

04/27/2021 at 08:35PM

9
#154 - m397 / @m39752809546

05/11/2021 at 10:45AM

9
#155 - Antoine Hachez / @Antoine_Hachez

05/17/2021 at 07:38AM

9
#156 - zmf_tim / @zmf_tim

05/31/2021 at 08:17PM

9
#157 - Michel Viktor / @tomkpz

07/25/2021 at 03:54AM

9
#158 - panakin skywalker / @_j3ffrey

08/31/2021 at 04:46PM

9
#159 - Hossein Yousefi πŸ’™ / @u_hossein

09/06/2021 at 07:34PM

9
#160 - yu xie / @yuxie21997666

09/15/2021 at 12:21PM

9
#161 - vineet / @vineet38383726

09/16/2021 at 10:30AM

9
#162 - Nick Repetti / @nick_repetti

09/23/2021 at 07:54PM

9
#163 - Mi60 Dev / @mi60dev

10/10/2021 at 02:41PM

9
#164 - Shunichi Kanade / @shunkana

10/11/2021 at 02:42AM

9
#165 - Chun Chanjun / @CChanjun

11/19/2021 at 03:48PM

9
#166 - PINGU / @PINGU79544082

12/04/2021 at 01:14PM

9
#167 - Dima Horshenin / @DimaHorshenin

12/06/2021 at 09:44AM

9
#168 - ._. / @Katharsic

12/29/2021 at 07:20AM

9
#169 - Humbaba / @humbabu

01/01/2022 at 12:18AM

9
#170 - POSIX / @po6ix

01/07/2022 at 03:09AM

9
#171 - Graeme Smith / @InstaGraeme

01/19/2022 at 05:36PM

9
#172 - D. πŸ‘‹ / @DCT_cpp

02/09/2022 at 01:54PM

9
#173 - Matthias Bartsch 🏠 / @MBartsch

02/21/2022 at 06:45PM

9
#174 - usless534 πŸŽ— / @usless534

03/19/2022 at 11:12PM

9
#175 - onkeL / @onkeL_cs

03/20/2022 at 12:05AM

9
#176 - κ·Έμ•ˆν•© / @asm6788_kor

04/01/2022 at 09:50AM

9
#177 - ν™©μ‹œμ€€_2771 / @ilPp5j1wfhKSFHr

04/04/2022 at 03:16AM

9
#178 - Choi Eun Chang / @fateflyec

04/04/2022 at 10:52AM

9
#179 - μ΅œμ΅œλŒ€λ‘œ / @Jaenedir

04/16/2022 at 05:00AM

9
#180 - λ°•μŠΉλ―Ό / @tmdals5512

04/17/2022 at 08:51AM