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

308 active golfers, 1229 entries

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

03/12/2023 at 12:10PM

20
#>109 - ky05uk3 / @kyo89347563

03/12/2023 at 12:09PM

21
#>132 - ky05uk3 / @kyo89347563

03/12/2023 at 12:07PM

23
#>141 - ky05uk3 / @kyo89347563

03/12/2023 at 12:05PM

24
#>154 - ky05uk3 / @kyo89347563

03/12/2023 at 12:03PM

24
#>154 - ky05uk3 / @kyo89347563

03/12/2023 at 12:04PM

24
#>154 - ky05uk3 / @kyo89347563

03/12/2023 at 12:06PM

24
#>154 - ky05uk3 / @kyo89347563

03/12/2023 at 12:10PM

26
#>174 - ky05uk3 / @kyo89347563

03/12/2023 at 12:00PM

27
#>181 - ky05uk3 / @kyo89347563

03/12/2023 at 11:59AM

28
#>189 - ky05uk3 / @kyo89347563

03/12/2023 at 11:58AM

29
#>201 - ky05uk3 / @kyo89347563

03/12/2023 at 11:57AM

30
#>209 - ky05uk3 / @kyo89347563

03/12/2023 at 11:56AM

31
#>219 - ky05uk3 / @kyo89347563

03/12/2023 at 11:54AM

35
#>257 - ky05uk3 / @kyo89347563

03/12/2023 at 11:51AM

37
#>268 - ky05uk3 / @kyo89347563

03/12/2023 at 11:50AM

51
#>290 - ky05uk3 / @kyo89347563

03/12/2023 at 11:48AM

63
#>300 - ky05uk3 / @kyo89347563

03/12/2023 at 11:47AM