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

118 active golfers, 418 entries

Leaderboard (lowest score wins):
25
#61 - Marcio M Pereira / @iviarcio

04/24/2021 at 03:54PM

26
#62 - Roman Matzutt / @matzutt

06/13/2021 at 08:13PM

26
#63 - neil / @im_needle

06/20/2021 at 10:17AM

26
#64 - Patrick Martin / @PatrickDMartin

07/01/2021 at 07:02PM

26
#65 - OliveWaterbuck / @OliveWaterbuck

09/07/2021 at 10:13PM

27
#66 - Jan / @Howi48

04/08/2021 at 02:13PM

27
#67 - Vgrbwat / @vgrbwat

06/11/2021 at 06:58PM

27
#68 - Tommy / @Tommy75962547

08/24/2021 at 06:21AM

29
#69 - asdgfwaefewf123123 / @asdgfwaefewf121

03/17/2021 at 02:34PM

29
#70 - Lucas / @Lucas90143719

04/18/2021 at 04:10AM

29
#71 - Antoine Hachez / @Antoine_Hachez

05/16/2021 at 10:58AM

29
#72 - damned-me / @damned_me_

05/24/2021 at 04:48PM

29
#73 - noname / @1____NULL____0

07/12/2021 at 01:57PM

29
#74 - tpoeiras / @tpoeirass

08/01/2021 at 02:49AM

30
#75 - Ceda EI / @ceda_ei

01/29/2021 at 06:49AM

30
#76 - simplelife2010 / @simplelife20101

05/13/2021 at 01:15PM

30
#77 - Calarasanu Andrei / @_fanfani4_

05/24/2021 at 07:15AM

31
#78 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#79 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#80 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

31
#81 - vimgolf / @vimgolf9

04/01/2021 at 08:27PM

31
#82 - Oscar / @GraveRaven

05/27/2021 at 12:28PM

31
#83 - models / @zornificator

06/23/2021 at 10:11PM

31
#84 - jdfgjhsbd / @bli231957

09/11/2021 at 01:15PM

32
#85 - Fake Konto / @F4k3K0n70

02/13/2021 at 11:07AM

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

03/05/2021 at 07:44AM

32
#87 - foobarbazqux12345 / @foobarbazqux121

03/05/2021 at 05:39PM

32
#88 - Russell Helmstedter / @RHelmstedter

03/28/2021 at 01:05AM

32
#89 - Kağan / @kaganyanikmeout

04/28/2021 at 02:58AM

32
#90 - Tanmay Chordia / @TanmayChordia1

05/17/2021 at 04:17AM