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

55 active golfers, 175 entries

Leaderboard (lowest score wins):
25
#31 - 蔡徐坤真是爱吃屎 / @Hashub7

02/01/2021 at 10:21AM

25
#32 - hamb / @hamb88140219

03/08/2021 at 02:11AM

25
#33 - tyfrasc15@gmail.com / @tyfrasc15

04/06/2021 at 06:25PM

25
#34 - Marcio M Pereira / @iviarcio

04/24/2021 at 03:54PM

27
#35 - Jan / @Howi48

04/08/2021 at 02:13PM

29
#36 - asdgfwaefewf123123 / @asdgfwaefewf121

03/17/2021 at 02:34PM

29
#37 - Lucas / @Lucas90143719

04/18/2021 at 04:10AM

30
#38 - Ceda EI / @ceda_ei

01/29/2021 at 06:49AM

30
#39 - simplelife2010 / @simplelife20101

05/13/2021 at 01:15PM

31
#40 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#41 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#42 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

31
#43 - vimgolf / @vimgolf9

04/01/2021 at 08:27PM

32
#44 - Fake Konto / @F4k3K0n70

02/13/2021 at 11:07AM

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

03/05/2021 at 07:44AM

32
#46 - foobarbazqux12345 / @foobarbazqux121

03/05/2021 at 05:39PM

32
#47 - Russell Helmstedter / @RHelmstedter

03/28/2021 at 01:05AM

32
#48 - Kağan / @kaganyanikmeout

04/28/2021 at 02:58AM

33
#49 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#50 - Łukasz / @srokadev

02/18/2021 at 08:15AM

34
#51 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

37
#52 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

38
#53 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

39
#54 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM

107
#55 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:12PM