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 @mattshen:

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

300 active golfers, 1214 entries

Solutions by @mattshen:
20
#115 - Matt Shen / @mattshen

01/23/2024 at 09:27AM

21
#>130 - Matt Shen / @mattshen

01/23/2024 at 09:26AM

22
#>132 - Matt Shen / @mattshen

01/23/2024 at 09:24AM

23
#>138 - Matt Shen / @mattshen

01/23/2024 at 09:21AM

24
#>151 - Matt Shen / @mattshen

01/23/2024 at 09:20AM

26
#>171 - Matt Shen / @mattshen

01/23/2024 at 09:09AM

27
#>178 - Matt Shen / @mattshen

01/23/2024 at 09:06AM

28
#>184 - Matt Shen / @mattshen

01/23/2024 at 08:58AM

29
#>196 - Matt Shen / @mattshen

01/23/2024 at 08:38AM

30
#>204 - Matt Shen / @mattshen

01/23/2024 at 08:36AM

32
#>239 - Matt Shen / @mattshen

01/23/2024 at 08:21AM

35
#>251 - Matt Shen / @mattshen

01/23/2024 at 07:18AM

36
#>256 - Matt Shen / @mattshen

01/23/2024 at 08:13AM

59
#>289 - Matt Shen / @mattshen

01/23/2024 at 07:00AM

64
#>292 - Matt Shen / @mattshen

01/23/2024 at 07:18AM