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

308 active golfers, 1229 entries

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

01/23/2024 at 09:27AM

21
#>132 - Matt Shen / @mattshen

01/23/2024 at 09:26AM

22
#>134 - Matt Shen / @mattshen

01/23/2024 at 09:24AM

23
#>142 - Matt Shen / @mattshen

01/23/2024 at 09:21AM

24
#>155 - Matt Shen / @mattshen

01/23/2024 at 09:20AM

26
#>175 - Matt Shen / @mattshen

01/23/2024 at 09:09AM

27
#>182 - Matt Shen / @mattshen

01/23/2024 at 09:06AM

28
#>189 - Matt Shen / @mattshen

01/23/2024 at 08:58AM

29
#>202 - Matt Shen / @mattshen

01/23/2024 at 08:38AM

30
#>210 - Matt Shen / @mattshen

01/23/2024 at 08:36AM

32
#>245 - Matt Shen / @mattshen

01/23/2024 at 08:21AM

35
#>257 - Matt Shen / @mattshen

01/23/2024 at 07:18AM

36
#>263 - Matt Shen / @mattshen

01/23/2024 at 08:13AM

59
#>297 - Matt Shen / @mattshen

01/23/2024 at 07:00AM

64
#>300 - Matt Shen / @mattshen

01/23/2024 at 07:18AM