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

277 active golfers, 1104 entries

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

03/12/2023 at 12:10PM

20
#>99 - ky05uk3 / @kyo89347563

03/12/2023 at 12:09PM

21
#>120 - ky05uk3 / @kyo89347563

03/12/2023 at 12:07PM

23
#>127 - ky05uk3 / @kyo89347563

03/12/2023 at 12:05PM

24
#>137 - ky05uk3 / @kyo89347563

03/12/2023 at 12:03PM

24
#>137 - ky05uk3 / @kyo89347563

03/12/2023 at 12:04PM

24
#>137 - ky05uk3 / @kyo89347563

03/12/2023 at 12:06PM

24
#>137 - ky05uk3 / @kyo89347563

03/12/2023 at 12:10PM

26
#>155 - ky05uk3 / @kyo89347563

03/12/2023 at 12:00PM

27
#>161 - ky05uk3 / @kyo89347563

03/12/2023 at 11:59AM

28
#>168 - ky05uk3 / @kyo89347563

03/12/2023 at 11:58AM

29
#>179 - ky05uk3 / @kyo89347563

03/12/2023 at 11:57AM

30
#>186 - ky05uk3 / @kyo89347563

03/12/2023 at 11:56AM

31
#>195 - ky05uk3 / @kyo89347563

03/12/2023 at 11:54AM

35
#>232 - ky05uk3 / @kyo89347563

03/12/2023 at 11:51AM

37
#>240 - ky05uk3 / @kyo89347563

03/12/2023 at 11:50AM

51
#>261 - ky05uk3 / @kyo89347563

03/12/2023 at 11:48AM

63
#>270 - ky05uk3 / @kyo89347563

03/12/2023 at 11:47AM