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 283 remaining solutions by signing in and submitting your own entry
#284 Meshan Naidoo / @realmeshan - Score: 227 - 01/14/24 @ 15:03
<Esc>jkjjjjwlyawjjjjjaa<Esc>uuujkkkkkkywa<Esc><Esc>jkyawjjjjjwwlhpa,<Esc>jkkkkkbhhhyawjjjjwwlllllllllllp<Esc>jkkkkkkjjbbhyawjjj4$<Esc>jkkjha,vimgolf put 6013804df3308e0009368f1c<Esc><Esc>ua<Esc>ha,<Esc>jkkkb<Esc>kbbjkhyawjjjwwwlllllllllllllllp<Esc>jkkkkjhhhhhhhhyawjj$<Esc>ha,<Esc>p<Esc>:wq<CR>

0 comments


Created by: @__ngtrongkha

284 active golfers, 1136 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 - Dan / @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

19
#19 - Arya Kumar / @SusSquirrel

05/16/2021 at 03:18AM

19
#20 - Ventura / @vetu11

05/18/2021 at 08:42AM

19
#21 - huscarl / @huscarl6

05/20/2021 at 02:34PM

19
#22 - Kyle / @Kyle98675198

05/30/2021 at 12:30AM

19
#23 - John Doe / @JohnDoe75830353

05/30/2021 at 02:27PM

19
#24 - Chetan Vashisht / @CheVaGiriShisht

06/05/2021 at 05:17PM

19
#25 - Pulkit Gupta / @pulkonet

06/20/2021 at 12:27AM

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

06/22/2021 at 01:22PM

19
#27 - sap / @sap38838304

06/27/2021 at 05:36PM

19
#28 - Georg Bökman / @BokmanGeorg

07/02/2021 at 11:29PM

19
#29 - 時空裂縫 / @0xdcbf

07/04/2021 at 08:34AM

19
#30 - 悟史 / @A1OBJTxN5fTg5EJ

07/13/2021 at 09:05AM