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 22 remaining solutions by signing in and submitting your own entry
#23 Mark Blakeney / @bulletmark - Score: 39 - 01/29/21 @ 04:44
4j4yyGP4V:s/:.*<CR>VkkkJr,F .F ,.kDJxA"<Esc>ZZ

0 comments


Created by: @__ngtrongkha

23 active golfers, 54 entries

Leaderboard (lowest score wins):
19
#1 - John Braxler / @braxler

01/29/2021 at 02:12PM

19
#2 - Jon Krause / @jkrause314

01/29/2021 at 04:58PM

19
#3 - Filipe Brandenburger / @filbranden

01/29/2021 at 10:32PM

19
#4 - A A A / @37fatos

02/01/2021 at 12:07AM

19
#5 - Smylers / @Smylers2

02/01/2021 at 09:47PM

19
#6 - Jianfeng / @Jianfen22425058

02/03/2021 at 06:41AM

19
#7 - roudens / @roudens2

03/06/2021 at 01:06AM

20
#8 - geosucker / @geosucker

02/25/2021 at 06:33PM

21
#9 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM

25
#10 - 蔡徐坤真是爱吃屎 / @Hashub7

02/01/2021 at 10:21AM

30
#11 - Ceda EI / @ceda_ei

01/29/2021 at 06:49AM

31
#12 - tylertucker202 / @tylertucker202

02/05/2021 at 03:03AM

31
#13 - fff / @fff51460170

02/20/2021 at 03:04PM

31
#14 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

32
#15 - Fake Konto / @F4k3K0n70

02/13/2021 at 11:07AM

32
#16 - I made a video game ✨ / @startresse

03/05/2021 at 07:44AM

32
#17 - foobarbazqux12345 / @foobarbazqux121

03/05/2021 at 05:39PM

33
#18 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#19 - Łukasz / @srokadev

02/18/2021 at 08:15AM

34
#20 - Jef Vlamings / @jefvlamings

02/11/2021 at 10:03AM

37
#21 - Pranshu Goyal / @PranshuGoyal

02/02/2021 at 08:51AM

38
#22 - Chris Conte / @chriscconte

02/11/2021 at 02:23AM

39
#23 - Mark Blakeney / @bulletmark

01/29/2021 at 04:44AM