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

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

284 active golfers, 1136 entries

Solutions by @VegetaLu:
21
#121 - 盧小小 / @VegetaLu

04/02/2022 at 09:12AM

25
#>147 - 盧小小 / @VegetaLu

04/02/2022 at 09:01AM

26
#>157 - 盧小小 / @VegetaLu

04/02/2022 at 08:59AM

26
#>157 - 盧小小 / @VegetaLu

04/02/2022 at 09:11AM

27
#>163 - 盧小小 / @VegetaLu

04/02/2022 at 08:56AM

27
#>163 - 盧小小 / @VegetaLu

04/02/2022 at 09:10AM

28
#>170 - 盧小小 / @VegetaLu

04/02/2022 at 08:52AM

29
#>181 - 盧小小 / @VegetaLu

04/02/2022 at 08:43AM

30
#>187 - 盧小小 / @VegetaLu

04/02/2022 at 08:39AM

30
#>187 - 盧小小 / @VegetaLu

04/02/2022 at 09:09AM

31
#>199 - 盧小小 / @VegetaLu

04/02/2022 at 08:34AM

32
#>221 - 盧小小 / @VegetaLu

04/02/2022 at 08:24AM

32
#>221 - 盧小小 / @VegetaLu

04/02/2022 at 08:52AM

35
#>237 - 盧小小 / @VegetaLu

04/02/2022 at 07:10AM

35
#>237 - 盧小小 / @VegetaLu

04/02/2022 at 08:51AM

40
#>255 - 盧小小 / @VegetaLu

04/02/2022 at 07:04AM

46
#>261 - 盧小小 / @VegetaLu

04/02/2022 at 07:03AM

47
#>261 - 盧小小 / @VegetaLu

04/02/2022 at 06:57AM

49
#>264 - 盧小小 / @VegetaLu

04/02/2022 at 08:23AM

65
#>277 - 盧小小 / @VegetaLu

04/02/2022 at 07:02AM

79
#>281 - 盧小小 / @VegetaLu

04/02/2022 at 06:55AM