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, 1001 entries

Leaderboard (lowest score wins):
8
#1 - Tinko Minko / @tandikula

07/17/2020 at 09:41PM

8
#2 - せいほう / @FICSQF

07/18/2020 at 01:58AM

8
#3 - JL T / @l0f4r0

07/19/2020 at 05:45PM

8
#4 - PK / @pkeugine

07/20/2020 at 03:10AM

8
#5 - Saurabh / @Saurabh09299

07/21/2020 at 09:08AM

8
#6 - Mislav Vuletić / @MasterGeeMedo

07/25/2020 at 06:57AM

8
#7 - Kim Bäckström / @Norttiiii

07/25/2020 at 09:26AM

8
#8 - Petro Тrouq / @zulolosi

07/26/2020 at 06:49PM

8
#9 - MathijsHoogland / @MathijsHoogland

07/27/2020 at 07:20AM

8
#10 - Gergely Risko / @errge

07/28/2020 at 10:07PM

8
#11 - Olle Wiklund / @Kabix

08/01/2020 at 06:07AM

8
#12 - Miłosz Łakomy / @foobar01123

08/02/2020 at 10:18AM

8
#13 - Ángel Durán / @AngeeelD

08/02/2020 at 05:39PM

8
#14 - Filipe Brandenburger / @filbranden

08/03/2020 at 04:22PM

8
#15 - Vinay Sharma / @VinaySh63956554

08/08/2020 at 06:08PM

8
#16 - Ivan Kwong / @IvanKwong5

08/09/2020 at 02:32PM

8
#17 - Ravi S Sinha / @ambidextrousTx

08/10/2020 at 10:55PM

8
#18 - Nicolas Marier / @NicMarier

08/13/2020 at 12:52PM

8
#19 - Cao Van Bi / @CaoVanBi235

08/21/2020 at 01:22AM

8
#20 - Blake Tereau / @BlakeTereau

08/26/2020 at 09:53PM

8
#21 - Luc Kien Hang / @luckienhang

09/04/2020 at 12:25AM

8
#22 - akouryy / @akouryy1

09/05/2020 at 02:00PM

8
#23 - dezhonger / @dezhonger

09/05/2020 at 04:04PM

8
#24 - mevmev / @mevmev8

09/23/2020 at 09:51PM

8
#25 - lamtt77 / @lamtt77

10/09/2020 at 09:34AM

8
#26 - Leo Winters / @LeoPWinters

10/19/2020 at 06:08PM

8
#27 - David Kutschke / @D4KU_

11/17/2020 at 09:34PM

8
#28 - quemeraisc / @quemeraisc

11/23/2020 at 11:18AM

8
#29 - roudens / @roudens2

12/27/2020 at 02:42PM

8
#30 - Jung Yeon Park / @park_jungy

01/04/2021 at 03:26PM