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

300 active golfers, 1214 entries

Leaderboard (lowest score wins):
24
#151 - Chris Braissant / @braissac

10/18/2023 at 10:12PM

24
#152 - jackyhevey / @jackyhevey

03/01/2024 at 05:31PM

24
#153 - Some-thing / @AngolMinsu

04/08/2024 at 01:37PM

24
#154 - godjun123 / @godjun123

03/31/2025 at 07:37AM

24
#155 - woozhin / @woozhin

04/01/2025 at 10:35AM

25
#156 - 蔡徐坤真是爱吃屎 / @Hashub7

02/01/2021 at 10:21AM

25
#157 - hamb / @hamb88140219

03/08/2021 at 02:11AM

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

04/06/2021 at 06:25PM

25
#159 - Marcio M Pereira / @iviarcio

04/24/2021 at 03:54PM

25
#160 - Levi Wheeler / @LeviWhe68726437

05/24/2022 at 05:27PM

25
#161 - uppercase reducer / @uppercasereduce

06/24/2023 at 08:43PM

25
#162 - 済木・R・A / @SAIKI_R_A

10/06/2023 at 05:17AM

25
#163 - satake0916 / @satake0916

12/31/2023 at 06:26AM

25
#164 - kjj / @gimseon67115271

04/14/2024 at 01:10PM

26
#165 - Roman Matzutt / @matzutt

06/13/2021 at 08:13PM

26
#166 - neil / @im_needle

06/20/2021 at 10:17AM

26
#167 - Patrick Martin / @PatrickDMartin

07/01/2021 at 07:02PM

26
#168 - OliveWaterbuck / @OliveWaterbuck

09/07/2021 at 10:13PM

26
#169 - Richy Strnad / @RichardStrnad

03/21/2022 at 06:13AM

26
#170 - vimgolfaccfekxh / @vimgolfaccfekxh

10/30/2022 at 01:25PM

26
#171 - Matt Zhang / @MattUnderscoreZhang

01/03/2024 at 09:19PM

26
#172 - diskeyd / @diskeyd

04/02/2025 at 10:57AM

27
#173 - Jan / @Howi48

04/08/2021 at 02:13PM

27
#174 - Vgrbwat / @vgrbwat

06/11/2021 at 06:58PM

27
#175 - Tommy / @Tommy75962547

08/24/2021 at 06:21AM

27
#176 - Isaak Meier / @IsaakMeier

10/06/2021 at 08:08PM

27
#177 - Brandon / @Brandon10678836

08/29/2022 at 12:12PM

27
#178 - 小世界 / @walilav

10/20/2023 at 08:37AM

27
#179 - TANN1N / @TANN1N

04/12/2024 at 07:11AM

27
#180 - Mystic / @aw0D5RUrdmxsylt

04/13/2024 at 06:34PM