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

192 active golfers, 761 entries

Leaderboard (lowest score wins):
30
#121 - simplelife2010 / @simplelife20101

05/13/2021 at 01:15PM

30
#122 - Calarasanu Andrei / @_fanfani4_

05/24/2021 at 07:15AM

30
#123 - Léo / @Leo58369183

08/24/2022 at 08:14AM

30
#124 - 0xf00ff00f / @0xf00ff00f

12/04/2022 at 11:30PM

30
#125 - kunsttyv / @kunsttyv

12/21/2022 at 08:37PM

31
#126 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#127 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#128 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

31
#129 - vimgolf / @vimgolf9

04/01/2021 at 08:27PM

31
#130 - Oscar / @GraveRaven

05/27/2021 at 12:28PM

31
#131 - models / @zornificator

06/23/2021 at 10:11PM

31
#132 - jdfgjhsbd / @bli231957

09/11/2021 at 01:15PM

31
#133 - Chongchong He / @chongchonghe

10/08/2022 at 08:52PM

32
#134 - Fake Konto / @F4k3K0n70

02/13/2021 at 11:07AM

32
#135 - ✨ / @startresse

03/05/2021 at 07:44AM

32
#136 - foobarbazqux12345 / @foobarbazqux121

03/05/2021 at 05:39PM

32
#137 - Russell Helmstedter / @RHelmstedter

03/28/2021 at 01:05AM

32
#138 - Kağan / @kaganyanikmeout

04/28/2021 at 02:58AM

32
#139 - Tanmay Chordia / @TanmayChordia1

05/17/2021 at 04:17AM

32
#140 - :wq / @write_quit_22

05/18/2021 at 05:40AM

32
#141 - nedlog / @nedlog18

05/18/2021 at 08:23PM

32
#142 - Andrew Ouzts / @andrew_ouzts

05/20/2021 at 05:33AM

32
#143 - 44 / @e__oioi

05/22/2021 at 12:50PM

32
#144 - Adam / @Adam75625825

06/26/2021 at 08:03PM

32
#145 - nullcasa / @nullcasa

07/14/2021 at 11:01PM

32
#146 - Michel Desjardins / @M8_Ofthegarden

08/11/2021 at 01:12AM

32
#147 - panakin skywalker / @_j3ffrey

08/31/2021 at 03:04PM

32
#148 - Shreeram / @Shrimpraam

09/08/2021 at 07:03PM

32
#149 - Bo Xie / @iebox

09/11/2021 at 01:14PM

32
#150 - 윤경호 / @GH_Yun2

12/05/2021 at 01:13PM