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

284 active golfers, 1136 entries

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

01/18/2024 at 08:44AM

20
#>109 - tkin91e55 / @tkin91e55

01/18/2024 at 08:37AM

33
#>234 - tkin91e55 / @tkin91e55

01/18/2024 at 08:33AM

35
#>237 - tkin91e55 / @tkin91e55

01/18/2024 at 07:31AM

38
#>249 - tkin91e55 / @tkin91e55

01/18/2024 at 07:24AM

42
#>257 - tkin91e55 / @tkin91e55

01/18/2024 at 07:20AM

46
#>261 - tkin91e55 / @tkin91e55

01/18/2024 at 07:22AM

48
#>264 - tkin91e55 / @tkin91e55

01/18/2024 at 07:25AM

55
#>268 - tkin91e55 / @tkin91e55

01/18/2024 at 07:17AM

62
#>276 - tkin91e55 / @tkin91e55

01/18/2024 at 06:45AM

63
#>276 - tkin91e55 / @tkin91e55

01/18/2024 at 06:38AM