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

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

311 active golfers, 1248 entries

Solutions by @kyo89347563:
19
#50 - ky05uk3 / @kyo89347563

03/12/2023 at 12:10PM

20
#>110 - ky05uk3 / @kyo89347563

03/12/2023 at 12:09PM

21
#>133 - ky05uk3 / @kyo89347563

03/12/2023 at 12:07PM

23
#>142 - ky05uk3 / @kyo89347563

03/12/2023 at 12:05PM

24
#>155 - ky05uk3 / @kyo89347563

03/12/2023 at 12:03PM

24
#>155 - ky05uk3 / @kyo89347563

03/12/2023 at 12:04PM

24
#>155 - ky05uk3 / @kyo89347563

03/12/2023 at 12:06PM

24
#>155 - ky05uk3 / @kyo89347563

03/12/2023 at 12:10PM

26
#>175 - ky05uk3 / @kyo89347563

03/12/2023 at 12:00PM

27
#>182 - ky05uk3 / @kyo89347563

03/12/2023 at 11:59AM

28
#>190 - ky05uk3 / @kyo89347563

03/12/2023 at 11:58AM

29
#>202 - ky05uk3 / @kyo89347563

03/12/2023 at 11:57AM

30
#>210 - ky05uk3 / @kyo89347563

03/12/2023 at 11:56AM

31
#>220 - ky05uk3 / @kyo89347563

03/12/2023 at 11:54AM

35
#>259 - ky05uk3 / @kyo89347563

03/12/2023 at 11:51AM

37
#>270 - ky05uk3 / @kyo89347563

03/12/2023 at 11:50AM

51
#>292 - ky05uk3 / @kyo89347563

03/12/2023 at 11:48AM

63
#>303 - ky05uk3 / @kyo89347563

03/12/2023 at 11:47AM