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

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

308 active golfers, 1229 entries

Solutions by @DV1X3R:
19
#49 - DV1X3R / @DV1X3R

10/22/2022 at 05:54PM

20
#>107 - DV1X3R / @DV1X3R

10/22/2022 at 05:53PM

21
#>132 - DV1X3R / @DV1X3R

10/22/2022 at 05:52PM

22
#>134 - DV1X3R / @DV1X3R

10/22/2022 at 05:51PM

23
#>141 - DV1X3R / @DV1X3R

10/22/2022 at 05:50PM

24
#>154 - DV1X3R / @DV1X3R

10/22/2022 at 05:48PM

25
#>164 - DV1X3R / @DV1X3R

10/22/2022 at 05:46PM

26
#>173 - DV1X3R / @DV1X3R

10/22/2022 at 05:44PM

27
#>181 - DV1X3R / @DV1X3R

10/22/2022 at 05:42PM

28
#>189 - DV1X3R / @DV1X3R

10/22/2022 at 05:41PM

29
#>201 - DV1X3R / @DV1X3R

10/22/2022 at 05:40PM

30
#>207 - DV1X3R / @DV1X3R

10/22/2022 at 05:38PM

32
#>242 - DV1X3R / @DV1X3R

10/22/2022 at 05:35PM

33
#>253 - DV1X3R / @DV1X3R

10/22/2022 at 05:33PM

34
#>257 - DV1X3R / @DV1X3R

10/22/2022 at 05:31PM

35
#>257 - DV1X3R / @DV1X3R

10/22/2022 at 05:32PM

89
#>305 - DV1X3R / @DV1X3R

10/22/2022 at 05:30PM

101
#>305 - DV1X3R / @DV1X3R

10/22/2022 at 05:24PM

237
#>308 - DV1X3R / @DV1X3R

10/22/2022 at 05:20PM