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

283 active golfers, 1127 entries

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

01/23/2024 at 09:27AM

21
#>122 - Matt Shen / @mattshen

01/23/2024 at 09:26AM

22
#>124 - Matt Shen / @mattshen

01/23/2024 at 09:24AM

23
#>130 - Matt Shen / @mattshen

01/23/2024 at 09:21AM

24
#>140 - Matt Shen / @mattshen

01/23/2024 at 09:20AM

26
#>158 - Matt Shen / @mattshen

01/23/2024 at 09:09AM

27
#>164 - Matt Shen / @mattshen

01/23/2024 at 09:06AM

28
#>170 - Matt Shen / @mattshen

01/23/2024 at 08:58AM

29
#>182 - Matt Shen / @mattshen

01/23/2024 at 08:38AM

30
#>190 - Matt Shen / @mattshen

01/23/2024 at 08:36AM

32
#>225 - Matt Shen / @mattshen

01/23/2024 at 08:21AM

35
#>236 - Matt Shen / @mattshen

01/23/2024 at 07:18AM

36
#>241 - Matt Shen / @mattshen

01/23/2024 at 08:13AM

59
#>272 - Matt Shen / @mattshen

01/23/2024 at 07:00AM

64
#>275 - Matt Shen / @mattshen

01/23/2024 at 07:18AM