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):
20
#121 - ishj00 / @ishj00

04/01/2025 at 01:59PM

21
#122 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM

21
#123 - grsh / @girish_i_am

05/21/2021 at 03:58PM

21
#124 - 盧小小 / @VegetaLu

04/02/2022 at 09:12AM

21
#125 - John Xu / @xzzhiao

04/06/2022 at 05:58PM

21
#126 - James Duffy / @jduffy3

04/12/2022 at 02:32AM

21
#127 - yge / @card-yun

04/14/2024 at 09:06AM

22
#128 - Yannick / @Yannick88147038

07/19/2022 at 07:35PM

22
#129 - cjchun3616 / @cjchun3616

04/04/2024 at 10:23AM

23
#130 - PINGU / @PINGU79544082

12/04/2021 at 04:15PM

23
#131 - Hossein Yousefi 💙 / @u_hossein

03/03/2022 at 04:52AM

23
#132 - Macunaíma / @Macunama11

05/06/2022 at 02:51PM

23
#133 - ShookerAndBeta / @Shooker2012

06/06/2022 at 03:39PM

23
#134 - مرجان / @IEnfantTerribIe

08/03/2023 at 03:24PM

23
#135 - 깔깔 / @dddh8204

04/14/2024 at 12:16AM

23
#136 - jhjhjhoh / @jhjhjhoh

04/14/2024 at 01:16PM

23
#137 - rlatmdgk1203 / @rlatmdgk1203

03/27/2025 at 01:49AM

23
#138 - HYoMo-nim / @HYoMo-nim

04/02/2025 at 01:52PM

23
#139 - kimbadaa / @kimbadaa

04/02/2025 at 02:12PM

24
#140 - Joshua Marple / @JoshuaMarple1

03/26/2021 at 07:46PM

24
#141 - Olle Wiklund / @Kabix

04/18/2021 at 04:18AM

24
#142 - Daniel Qu / @danielq9871

05/03/2021 at 02:49PM

24
#143 - Francois Marais / @maraisf

05/21/2021 at 12:36AM

24
#144 - ThatGuyWithAWeirdHat / @Mousakaaa

07/17/2021 at 06:09PM

24
#145 - François / @mortyZZ

08/01/2021 at 08:54PM

24
#146 - 야통이 / @gonnanailedit

12/03/2021 at 04:53PM

24
#147 - Chris Braissant / @braissac

10/18/2023 at 10:12PM

24
#148 - jackyhevey / @jackyhevey

03/01/2024 at 05:31PM

24
#149 - Some-thing / @AngolMinsu

04/08/2024 at 01:37PM

24
#150 - godjun123 / @godjun123

03/31/2025 at 07:37AM