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

295 active golfers, 1192 entries

Leaderboard (lowest score wins):
28
#181 - rkrkrkwk / @rkrkrkwk

04/13/2024 at 05:04PM

29
#182 - asdgfwaefewf123123 / @asdgfwaefewf121

03/17/2021 at 02:34PM

29
#183 - Lucas / @Lucas90143719

04/18/2021 at 04:10AM

29
#184 - Antoine Hachez / @Antoine_Hachez

05/16/2021 at 10:58AM

29
#185 - damned-me / @damned_me_

05/24/2021 at 04:48PM

29
#186 - noname / @1____NULL____0

07/12/2021 at 01:57PM

29
#187 - tpoeiras / @tpoeirass

08/01/2021 at 02:49AM

29
#188 - sydman / @sydman11

11/18/2021 at 08:59AM

29
#189 - Chun Chanjun / @CChanjun

11/19/2021 at 03:10PM

29
#190 - 박기창 / @baggichang3

12/02/2021 at 01:50PM

29
#191 - math is what I hate / @mpnmbn

06/12/2022 at 02:26PM

29
#192 - Jakob Weickmann / @jweickm

11/14/2023 at 03:06PM

29
#193 - constap / @constap

04/25/2024 at 11:06PM

30
#194 - Ceda EI / @ceda_ei

01/29/2021 at 06:49AM

30
#195 - simplelife2010 / @simplelife20101

05/13/2021 at 01:15PM

30
#196 - Calarasanu Andrei / @_fanfani4_

05/24/2021 at 07:15AM

30
#197 - Léo / @Leo58369183

08/24/2022 at 08:14AM

30
#198 - 0xf00ff00f / @0xf00ff00f

12/04/2022 at 11:30PM

30
#199 - kunsttyv / @kunsttyv

12/21/2022 at 08:37PM

30
#200 - Ludovic Schwartz / @ludovicschwartz

11/20/2023 at 01:57PM

30
#201 - KoroneListener / @KoroneListener

09/04/2024 at 04:33PM

31
#202 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#203 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#204 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

31
#205 - vimgolf / @vimgolf9

04/01/2021 at 08:27PM

31
#206 - Oscar / @GraveRaven

05/27/2021 at 12:28PM

31
#207 - models / @zornificator

06/23/2021 at 10:11PM

31
#208 - jdfgjhsbd / @bli231957

09/11/2021 at 01:15PM

31
#209 - Chongchong He / @chongchonghe

10/08/2022 at 08:52PM

31
#210 - 으앙 / @meri2727

10/11/2023 at 11:40AM