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

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

248 active golfers, 982 entries

Solutions by @aecant:
19
#37 - Alessandro Cantini / @aecant

10/06/2021 at 05:09PM

20
#>79 - Alessandro Cantini / @aecant

10/06/2021 at 05:08PM

24
#>114 - Alessandro Cantini / @aecant

10/06/2021 at 05:07PM