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

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

311 active golfers, 1248 entries

Solutions by @painkiller_2357:
19
#75 - 유채운 / @painkiller_2357

04/13/2024 at 01:09PM

19
#>75 - 유채운 / @painkiller_2357

04/13/2024 at 01:43PM

20
#>125 - 유채운 / @painkiller_2357

04/13/2024 at 01:07PM

21
#>133 - 유채운 / @painkiller_2357

04/13/2024 at 06:27AM

21
#>133 - 유채운 / @painkiller_2357

04/13/2024 at 06:31AM

25
#>168 - 유채운 / @painkiller_2357

04/13/2024 at 06:25AM

31
#>222 - 유채운 / @painkiller_2357

04/12/2024 at 05:42PM

32
#>248 - 유채운 / @painkiller_2357

04/12/2024 at 05:35PM

41
#>281 - 유채운 / @painkiller_2357

04/12/2024 at 05:31PM

54
#>294 - 유채운 / @painkiller_2357

04/12/2024 at 05:25PM

69
#>306 - 유채운 / @painkiller_2357

04/12/2024 at 05:11PM

84
#>308 - 유채운 / @painkiller_2357

04/12/2024 at 05:10PM

104
#>308 - 유채운 / @painkiller_2357

04/12/2024 at 04:56PM