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

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

169 active golfers, 650 entries

Solutions by @VegetaLu:
21
#67 - 盧小小 / @VegetaLu

04/02/2022 at 09:12AM

25
#>84 - 盧小小 / @VegetaLu

04/02/2022 at 09:01AM

26
#>90 - 盧小小 / @VegetaLu

04/02/2022 at 08:59AM

26
#>90 - 盧小小 / @VegetaLu

04/02/2022 at 09:11AM

27
#>94 - 盧小小 / @VegetaLu

04/02/2022 at 08:56AM

27
#>94 - 盧小小 / @VegetaLu

04/02/2022 at 09:10AM

28
#>97 - 盧小小 / @VegetaLu

04/02/2022 at 08:52AM

29
#>106 - 盧小小 / @VegetaLu

04/02/2022 at 08:43AM

30
#>110 - 盧小小 / @VegetaLu

04/02/2022 at 08:39AM

30
#>110 - 盧小小 / @VegetaLu

04/02/2022 at 09:09AM

31
#>117 - 盧小小 / @VegetaLu

04/02/2022 at 08:34AM

32
#>136 - 盧小小 / @VegetaLu

04/02/2022 at 08:24AM

32
#>136 - 盧小小 / @VegetaLu

04/02/2022 at 08:52AM

35
#>145 - 盧小小 / @VegetaLu

04/02/2022 at 07:10AM

35
#>145 - 盧小小 / @VegetaLu

04/02/2022 at 08:51AM

40
#>155 - 盧小小 / @VegetaLu

04/02/2022 at 07:04AM

46
#>159 - 盧小小 / @VegetaLu

04/02/2022 at 07:03AM

47
#>159 - 盧小小 / @VegetaLu

04/02/2022 at 06:57AM

49
#>159 - 盧小小 / @VegetaLu

04/02/2022 at 08:23AM

65
#>165 - 盧小小 / @VegetaLu

04/02/2022 at 07:02AM

79
#>168 - 盧小小 / @VegetaLu

04/02/2022 at 06:55AM