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

97 active golfers, 349 entries

Leaderboard (lowest score wins):
9
#1 - Adam / @Adam75625825

06/26/2021 at 08:38PM

19
#2 - John Braxler / @braxler

01/29/2021 at 02:12PM

19
#3 - Jon Krause / @jkrause314

01/29/2021 at 04:58PM

19
#4 - Filipe Brandenburger / @filbranden

01/29/2021 at 10:32PM

19
#5 - A A A / @37fatos

02/01/2021 at 12:07AM

19
#6 - Smylers / @Smylers2

02/01/2021 at 09:47PM

19
#7 - Jianfeng / @Jianfen22425058

02/03/2021 at 06:41AM

19
#8 - roudens / @roudens2

03/06/2021 at 01:06AM

19
#9 - Ray Dennis / @raysden

03/08/2021 at 09:15PM

19
#10 - a b c / @abc41115243

03/13/2021 at 02:26AM

19
#11 - maxtong / @maxtong1987

03/19/2021 at 10:06AM

19
#12 - Andreas Siegrist / @andreaszwei

03/19/2021 at 01:10PM

19
#13 - pikjes / @pikjes2

03/20/2021 at 09:00PM

19
#14 - Daniel Steinberg / @dstein64

03/22/2021 at 08:04PM

19
#15 - zmf_tim / @zmf_tim

03/22/2021 at 10:55PM

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

03/23/2021 at 04:10PM

19
#17 - デニス / @rolzy4

04/05/2021 at 12:49AM

19
#18 - br_bookbinder / @br_bookbinder

04/28/2021 at 09:45PM

19
#19 - Jaehong Park / @jaehongp

05/05/2021 at 12:09AM

19
#20 - Arya Kumar / @SusSquirrel

05/16/2021 at 03:18AM

19
#21 - Ventura / @vetu11

05/18/2021 at 08:42AM

19
#22 - huscarl / @huscarl6

05/20/2021 at 02:34PM

19
#23 - Kyle / @Kyle98675198

05/30/2021 at 12:30AM

19
#24 - John Doe / @JohnDoe75830353

05/30/2021 at 02:27PM

19
#25 - Chetan Vashisht / @CheVaGiriShisht

06/05/2021 at 05:17PM

19
#26 - Pulkit Gupta / @pulkonet

06/20/2021 at 12:27AM

19
#27 - Miłosz Łakomy / @foobar01123

06/22/2021 at 01:22PM

19
#28 - sap / @sap38838304

06/27/2021 at 05:36PM

19
#29 - Georg Bökman / @BokmanGeorg

07/02/2021 at 11:29PM

19
#30 - 0xdrowsy / @0xdrowsy

07/04/2021 at 08:34AM