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

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

308 active golfers, 1229 entries

Solutions by @tkin91e55:
19
#65 - tkin91e55 / @tkin91e55

01/18/2024 at 08:44AM

20
#>116 - tkin91e55 / @tkin91e55

01/18/2024 at 08:37AM

33
#>254 - tkin91e55 / @tkin91e55

01/18/2024 at 08:33AM

35
#>257 - tkin91e55 / @tkin91e55

01/18/2024 at 07:31AM

38
#>272 - tkin91e55 / @tkin91e55

01/18/2024 at 07:24AM

42
#>280 - tkin91e55 / @tkin91e55

01/18/2024 at 07:20AM

46
#>285 - tkin91e55 / @tkin91e55

01/18/2024 at 07:22AM

48
#>288 - tkin91e55 / @tkin91e55

01/18/2024 at 07:25AM

55
#>292 - tkin91e55 / @tkin91e55

01/18/2024 at 07:17AM

62
#>300 - tkin91e55 / @tkin91e55

01/18/2024 at 06:45AM

63
#>300 - tkin91e55 / @tkin91e55

01/18/2024 at 06:38AM