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

53 active golfers, 168 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

19
#8 - Ray Dennis / @raysden

03/08/2021 at 09:15PM

19
#9 - a b c / @abc41115243

03/13/2021 at 02:26AM

19
#10 - maxtong / @maxtong1987

03/19/2021 at 10:06AM

19
#11 - Andreas Siegrist / @andreaszwei

03/19/2021 at 01:10PM

19
#12 - pikjes / @pikjes2

03/20/2021 at 09:00PM

19
#13 - Daniel Steinberg / @dstein64

03/22/2021 at 08:04PM

19
#14 - zmf_tim / @zmf_tim

03/22/2021 at 10:55PM

19
#15 - Eric Söderström / @eksoderstrom

03/23/2021 at 04:10PM

19
#16 - デニス / @rolzy4

04/05/2021 at 12:49AM

19
#17 - br_bookbinder / @br_bookbinder

04/28/2021 at 09:45PM

19
#18 - Jaehong Park / @jaehongp

05/05/2021 at 12:09AM

20
#19 - geosucker / @geosucker

02/25/2021 at 06:33PM

20
#20 - der tanzbaer / @der_tanzbaer

03/10/2021 at 08:01PM

20
#21 - せいほう / @FICSQF

03/11/2021 at 07:54AM

20
#22 - treb / @treb03683130

03/12/2021 at 03:01PM

20
#23 - Paul Adlene / @AdlenePaul

03/15/2021 at 05:04PM

20
#24 - warwickrulez / @warwickrulez

03/30/2021 at 03:01PM

20
#25 - Jackmarocks / @jackmarocks

04/05/2021 at 01:34PM

21
#26 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM

24
#27 - Joshua Marple / @JoshuaMarple1

03/26/2021 at 07:46PM

24
#28 - Olle Wiklund / @Kabix

04/18/2021 at 04:18AM

24
#29 - Daniel Qu / @danielq9871

05/03/2021 at 02:49PM

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

02/01/2021 at 10:21AM