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 6013804df3308e0009368f1c

Python dataclasses

Simple challenge to extract fields from a Python class

Start file
from dataclasses import dataclass

@dataclass
class Student:
    student_id: str
    name: str
    age: int 
    score: float

fields = ""

End file
from dataclasses import dataclass

@dataclass
class Student:
    student_id: str
    name: str
    age: int 
    score: float

fields = "student_id,name,age,score"

View Diff

10c10
< fields = ""
---
> fields = "student_id,name,age,score"

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 177 remaining solutions by signing in and submitting your own entry
#178 Kenneth Hyman / @kjhyman - Score: 107 - 04/27/21 @ 14:12
jjjjebveyjjjjejekeeei<Esc>pkkkkbbbveduveyjjjeeeeebea,<Esc>pkkkbbbveduveyjjjeeeeeea,<Esc>p<Esc>kkbbbveyjjeeeeeeeea,<Esc>p:w<CR>:wq<CR>

0 comments


Created by: @__ngtrongkha

178 active golfers, 686 entries

Leaderboard (lowest score wins):
26
#91 - neil / @im_needle

06/20/2021 at 10:17AM

26
#92 - Patrick Martin / @PatrickDMartin

07/01/2021 at 07:02PM

26
#93 - OliveWaterbuck / @OliveWaterbuck

09/07/2021 at 10:13PM

26
#94 - Richy Strnad / @RichardStrnad

03/21/2022 at 06:13AM

27
#95 - Jan / @Howi48

04/08/2021 at 02:13PM

27
#96 - Vgrbwat / @vgrbwat

06/11/2021 at 06:58PM

27
#97 - Tommy / @Tommy75962547

08/24/2021 at 06:21AM

27
#98 - Isaak Meier / @IsaakMeier

10/06/2021 at 08:08PM

27
#99 - Brandon / @Brandon10678836

08/29/2022 at 12:12PM

28
#100 - Gerrit Prößl / @pearisgreen

11/27/2021 at 05:23PM

28
#101 - ココアサ / @zAxLcKjTWc6aP6P

12/04/2021 at 02:58AM

28
#102 - 박덕구 / @bagdeoggu

12/05/2021 at 07:13AM

28
#103 - leo / @leo848b

09/14/2022 at 05:33PM

29
#104 - asdgfwaefewf123123 / @asdgfwaefewf121

03/17/2021 at 02:34PM

29
#105 - Lucas / @Lucas90143719

04/18/2021 at 04:10AM

29
#106 - Antoine Hachez / @Antoine_Hachez

05/16/2021 at 10:58AM

29
#107 - damned-me / @damned_me_

05/24/2021 at 04:48PM

29
#108 - noname / @1____NULL____0

07/12/2021 at 01:57PM

29
#109 - tpoeiras / @tpoeirass

08/01/2021 at 02:49AM

29
#110 - sydman / @sydman11

11/18/2021 at 08:59AM

29
#111 - Chun Chanjun / @CChanjun

11/19/2021 at 03:10PM

29
#112 - 박기창 / @baggichang3

12/02/2021 at 01:50PM

29
#113 - math is what I hate / @mpnmbn

06/12/2022 at 02:26PM

30
#114 - Ceda EI / @ceda_ei

01/29/2021 at 06:49AM

30
#115 - simplelife2010 / @simplelife20101

05/13/2021 at 01:15PM

30
#116 - Calarasanu Andrei / @_fanfani4_

05/24/2021 at 07:15AM

30
#117 - Léo / @Leo58369183

08/24/2022 at 08:14AM

31
#118 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#119 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#120 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM