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 141 remaining solutions by signing in and submitting your own entry
#142 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

142 active golfers, 529 entries

Leaderboard (lowest score wins):
29
#91 - tpoeiras / @tpoeirass

08/01/2021 at 02:49AM

29
#92 - sydman / @sydman11

11/18/2021 at 08:59AM

29
#93 - Chun Chanjun / @CChanjun

11/19/2021 at 03:10PM

29
#94 - 박기창 / @baggichang3

12/02/2021 at 01:50PM

30
#95 - Ceda EI / @ceda_ei

01/29/2021 at 06:49AM

30
#96 - simplelife2010 / @simplelife20101

05/13/2021 at 01:15PM

30
#97 - Calarasanu Andrei / @_fanfani4_

05/24/2021 at 07:15AM

31
#98 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#99 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#100 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

31
#101 - vimgolf / @vimgolf9

04/01/2021 at 08:27PM

31
#102 - Oscar / @GraveRaven

05/27/2021 at 12:28PM

31
#103 - models / @zornificator

06/23/2021 at 10:11PM

31
#104 - jdfgjhsbd / @bli231957

09/11/2021 at 01:15PM

32
#105 - Fake Konto / @F4k3K0n70

02/13/2021 at 11:07AM

32
#106 - I made a video game ✨ / @startresse

03/05/2021 at 07:44AM

32
#107 - foobarbazqux12345 / @foobarbazqux121

03/05/2021 at 05:39PM

32
#108 - Russell Helmstedter / @RHelmstedter

03/28/2021 at 01:05AM

32
#109 - Kağan / @kaganyanikmeout

04/28/2021 at 02:58AM

32
#110 - Tanmay Chordia / @TanmayChordia1

05/17/2021 at 04:17AM

32
#111 - :wq / @write_quit_22

05/18/2021 at 05:40AM

32
#112 - nedlog / @nedlog18

05/18/2021 at 08:23PM

32
#113 - Andrew Ouzts / @andrew_ouzts

05/20/2021 at 05:33AM

32
#114 - 44 / @e__oioi

05/22/2021 at 12:50PM

32
#115 - Adam / @Adam75625825

06/26/2021 at 08:03PM

32
#116 - nullcasa / @nullcasa

07/14/2021 at 11:01PM

32
#117 - Michel Desjardins / @M8_Ofthegarden

08/11/2021 at 01:12AM

32
#118 - panakin skywalker / @_j3ffrey

08/31/2021 at 03:04PM

32
#119 - Shreeram / @Shrimpraam

09/08/2021 at 07:03PM

32
#120 - Bo Xie / @iebox

09/11/2021 at 01:14PM