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 279 remaining solutions by signing in and submitting your own entry
#280 Meshan Naidoo / @realmeshan - Score: 227 - 01/14/24 @ 15:03
<Esc>jkjjjjwlyawjjjjjaa<Esc>uuujkkkkkkywa<Esc><Esc>jkyawjjjjjwwlhpa,<Esc>jkkkkkbhhhyawjjjjwwlllllllllllp<Esc>jkkkkkkjjbbhyawjjj4$<Esc>jkkjha,vimgolf put 6013804df3308e0009368f1c<Esc><Esc>ua<Esc>ha,<Esc>jkkkb<Esc>kbbjkhyawjjjwwwlllllllllllllllp<Esc>jkkkkjhhhhhhhhyawjj$<Esc>ha,<Esc>p<Esc>:wq<CR>

0 comments


Created by: @__ngtrongkha

280 active golfers, 1120 entries

Leaderboard (lowest score wins):
29
#181 - math is what I hate / @mpnmbn

06/12/2022 at 02:26PM

29
#182 - Jakob Weickmann / @jweickm

11/14/2023 at 03:06PM

29
#183 - constap / @constap

04/25/2024 at 11:06PM

30
#184 - Ceda EI / @ceda_ei

01/29/2021 at 06:49AM

30
#185 - simplelife2010 / @simplelife20101

05/13/2021 at 01:15PM

30
#186 - Calarasanu Andrei / @_fanfani4_

05/24/2021 at 07:15AM

30
#187 - Léo / @Leo58369183

08/24/2022 at 08:14AM

30
#188 - 0xf00ff00f / @0xf00ff00f

12/04/2022 at 11:30PM

30
#189 - kunsttyv / @kunsttyv

12/21/2022 at 08:37PM

30
#190 - Ludovic Schwartz / @ludovicschwartz

11/20/2023 at 01:57PM

31
#191 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#192 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#193 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

31
#194 - vimgolf / @vimgolf9

04/01/2021 at 08:27PM

31
#195 - Oscar / @GraveRaven

05/27/2021 at 12:28PM

31
#196 - models / @zornificator

06/23/2021 at 10:11PM

31
#197 - jdfgjhsbd / @bli231957

09/11/2021 at 01:15PM

31
#198 - Chongchong He / @chongchonghe

10/08/2022 at 08:52PM

31
#199 - 으앙 / @meri2727

10/11/2023 at 11:40AM

31
#200 - Hugo O Rivera / @roguh

12/29/2023 at 04:44AM

32
#201 - Fake Konto / @F4k3K0n70

02/13/2021 at 11:07AM

32
#202 - ✨ / @startresse

03/05/2021 at 07:44AM

32
#203 - foobarbazqux12345 / @foobarbazqux121

03/05/2021 at 05:39PM

32
#204 - Russell Helmstedter / @RHelmstedter

03/28/2021 at 01:05AM

32
#205 - Kağan / @kaganyanikmeout

04/28/2021 at 02:58AM

32
#206 - Tanmay Chordia / @TanmayChordia1

05/17/2021 at 04:17AM

32
#207 - :wq / @write_quit_22

05/18/2021 at 05:40AM

32
#208 - nedlog / @nedlog18

05/18/2021 at 08:23PM

32
#209 - Andrew Ouzts / @andrew_ouzts

05/20/2021 at 05:33AM

32
#210 - 44 / @e__oioi

05/22/2021 at 12:50PM