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 by @kanguk123:

Unlock 14 remaining solutions by signing in and submitting your own entry
Created by: @__ngtrongkha

300 active golfers, 1214 entries

Solutions by @kanguk123:
20
#124 - kanguk123 / @kanguk123

03/29/2025 at 06:08PM

21
#>131 - kanguk123 / @kanguk123

03/29/2025 at 06:07PM

22
#>133 - kanguk123 / @kanguk123

03/29/2025 at 06:07PM

23
#>141 - kanguk123 / @kanguk123

03/29/2025 at 06:06PM

24
#>153 - kanguk123 / @kanguk123

03/29/2025 at 06:06PM

25
#>164 - kanguk123 / @kanguk123

03/29/2025 at 06:05PM

26
#>171 - kanguk123 / @kanguk123

03/29/2025 at 06:04PM

27
#>180 - kanguk123 / @kanguk123

03/29/2025 at 06:01PM

28
#>185 - kanguk123 / @kanguk123

03/29/2025 at 06:00PM

29
#>197 - kanguk123 / @kanguk123

03/29/2025 at 05:59PM

30
#>205 - kanguk123 / @kanguk123

03/29/2025 at 05:59PM

31
#>215 - kanguk123 / @kanguk123

03/29/2025 at 05:58PM

32
#>241 - kanguk123 / @kanguk123

03/29/2025 at 05:49PM

33
#>248 - kanguk123 / @kanguk123

03/29/2025 at 05:46PM