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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 216 remaining solutions by signing in and submitting your own entry
#217 Kenneth Hyman / @kjhyman - Score: 107 - 04/27/21 @ 14:12
jjjjebveyjjjjejekeeei<Esc>pkkkkbbbveduveyjjjeeeeebea,<Esc>pkkkbbbveduveyjjjeeeeeea,<Esc>p<Esc>kkbbbveyjjeeeeeeeea,<Esc>p:w<CR>:wq<CR>

0 comments


Created by: @__ngtrongkha

217 active golfers, 828 entries

Leaderboard (lowest score wins):
60
#211 - steve bolo / @steve_bolo

08/04/2022 at 04:21PM

60
#212 - U G / @rozeannehd

03/18/2023 at 11:12PM

65
#213 - วทททท / @uhTOWreLzQy0JN5

03/02/2022 at 02:42PM

67
#214 - qixiao / @qixiao986

05/31/2021 at 05:56AM

69
#215 - Thitichote Chaimuang / @ThitichoteC

03/02/2022 at 04:51PM

75
#216 - 宋彤雨 / @SDNAnyFlow

08/20/2021 at 04:51AM

107
#217 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:12PM