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

140 active golfers, 520 entries

Leaderboard (lowest score wins):
21
#61 - grsh / @girish_i_am

05/21/2021 at 03:58PM

23
#62 - PINGU / @PINGU79544082

12/04/2021 at 04:15PM

24
#63 - Joshua Marple / @JoshuaMarple1

03/26/2021 at 07:46PM

24
#64 - Olle Wiklund / @Kabix

04/18/2021 at 04:18AM

24
#65 - Daniel Qu / @danielq9871

05/03/2021 at 02:49PM

24
#66 - François Marais / @maraisf

05/21/2021 at 12:36AM

24
#67 - ThatGuyWithAWeirdHat / @Mousakaaa

07/17/2021 at 06:09PM

24
#68 - François / @mortyZZ

08/01/2021 at 08:54PM

24
#69 - 야통이 / @gonnanailedit

12/03/2021 at 04:53PM

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

02/01/2021 at 10:21AM

25
#71 - hamb / @hamb88140219

03/08/2021 at 02:11AM

25
#72 - tyfrasc15@gmail.com / @tyfrasc15

04/06/2021 at 06:25PM

25
#73 - Marcio M Pereira / @iviarcio

04/24/2021 at 03:54PM

26
#74 - Roman Matzutt / @matzutt

06/13/2021 at 08:13PM

26
#75 - neil / @im_needle

06/20/2021 at 10:17AM

26
#76 - Patrick Martin / @PatrickDMartin

07/01/2021 at 07:02PM

26
#77 - OliveWaterbuck / @OliveWaterbuck

09/07/2021 at 10:13PM

27
#78 - Jan / @Howi48

04/08/2021 at 02:13PM

27
#79 - Vgrbwat / @vgrbwat

06/11/2021 at 06:58PM

27
#80 - Tommy / @Tommy75962547

08/24/2021 at 06:21AM

27
#81 - Isaak Meier / @IsaakMeier

10/06/2021 at 08:08PM

28
#82 - Gerrit Prößl / @pearisgreen

11/27/2021 at 05:23PM

28
#83 - ココアサ / @zAxLcKjTWc6aP6P

12/04/2021 at 02:58AM

28
#84 - 박덕구 / @bagdeoggu

12/05/2021 at 07:13AM

29
#85 - asdgfwaefewf123123 / @asdgfwaefewf121

03/17/2021 at 02:34PM

29
#86 - Lucas / @Lucas90143719

04/18/2021 at 04:10AM

29
#87 - Antoine Hachez / @Antoine_Hachez

05/16/2021 at 10:58AM

29
#88 - damned-me / @damned_me_

05/24/2021 at 04:48PM

29
#89 - noname / @1____NULL____0

07/12/2021 at 01:57PM

29
#90 - tpoeiras / @tpoeirass

08/01/2021 at 02:49AM