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 191 remaining solutions by signing in and submitting your own entry
#192 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

192 active golfers, 761 entries

Leaderboard (lowest score wins):
32
#151 - tarotbybye / @tarotbybyeart

03/03/2022 at 04:13AM

32
#152 - good enough ; 🌿 / @daisyymint

03/03/2022 at 03:17PM

32
#153 - タケ / @Take3832

04/24/2022 at 05:22AM

32
#154 - Omar Alawadhi / @OmarAla59544225

09/10/2022 at 05:38PM

32
#155 - grhkm / @grhkm21

12/19/2022 at 05:37PM

32
#156 - fredy / @locked_outside

01/30/2023 at 11:05PM

33
#157 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#158 - Łukasz / @srokadev

02/18/2021 at 08:15AM

33
#159 - Swaraj Dash / @swarajdash_

11/17/2021 at 12:03AM

33
#160 - philip / @philip5530

03/03/2022 at 03:30AM

33
#161 - Abnermtj / @Abnerjr19

08/16/2022 at 05:58AM

34
#162 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

34
#163 - ดิว - รุจิภาส / @deadbook60

03/02/2022 at 12:04PM

34
#164 - แฟน___คนโปรด / @WannaPlayGame_

03/03/2022 at 12:23AM

36
#165 - SaltyAom / @saltyAom

03/02/2022 at 03:22PM

36
#166 - pankace / @pankace_Frosted

03/02/2022 at 08:33PM

37
#167 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

37
#168 - Miaomiao@.dandan / @Miaomiao_dandan

01/24/2022 at 05:55AM

37
#169 - Joseph Baek / @joseph_sg_baek

03/23/2022 at 02:55PM

38
#170 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

38
#171 - A White Dwarf / @AWhiteDwarf1

06/27/2021 at 04:18PM

38
#172 - Matthew Stachowiak / @Drahlous1

11/05/2022 at 02:15AM

39
#173 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM

39
#174 - Jean-Francois Parent / @hacker_pyrat

07/20/2021 at 06:53PM

40
#175 - oleg / @oleg12573505

01/29/2022 at 05:12PM

41
#176 - e_e / @eleloi

02/12/2023 at 06:09PM

42
#177 - vimgolf_vinz / @VimgolfV

09/20/2021 at 04:29PM

43
#178 - 윤승후 / @yunseunghu7

03/04/2022 at 05:50AM

44
#179 - elqver / @elqver

05/16/2021 at 03:17PM

44
#180 - Un Extraño / @link145m

07/30/2021 at 01:37AM