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

118 active golfers, 418 entries

Leaderboard (lowest score wins):
19
#31 - I_Don't_Want_This_Account / @IDontWa59298038

07/16/2021 at 01:55AM

19
#32 - Marcos / @adayintexas

07/27/2021 at 06:55PM

19
#33 - quemeraisc / @quemeraisc

08/21/2021 at 04:12PM

19
#34 - Roman Privalov / @RomanPrivalov

08/24/2021 at 05:39AM

19
#35 - Dmitry Antonyuk / @AntonyukDmitry

08/24/2021 at 04:57PM

19
#36 - yancy / @yancy_dong

09/16/2021 at 01:00PM

20
#37 - geosucker / @geosucker

02/25/2021 at 06:33PM

20
#38 - der tanzbaer / @der_tanzbaer

03/10/2021 at 08:01PM

20
#39 - せいほう / @FICSQF

03/11/2021 at 07:54AM

20
#40 - treb / @treb03683130

03/12/2021 at 03:01PM

20
#41 - Paul Adlene / @AdlenePaul

03/15/2021 at 05:04PM

20
#42 - warwickrulez / @warwickrulez

03/30/2021 at 03:01PM

20
#43 - Jackmarocks / @jackmarocks

04/05/2021 at 01:34PM

20
#44 - Sven Kõiv / @KoivSven

05/09/2021 at 03:52PM

20
#45 - ゆに / @lededex

07/13/2021 at 08:13PM

20
#46 - ippachi / @ippachi1018

08/08/2021 at 10:07AM

20
#47 - mevmev / @mevmev8

08/12/2021 at 05:19PM

20
#48 - Quentin Leroy / @qnleroy

08/22/2021 at 09:34AM

20
#49 - Rory Smith / @alan0buchanan

09/20/2021 at 11:14PM

21
#50 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM

21
#51 - grsh / @girish_i_am

05/21/2021 at 03:58PM

24
#52 - Joshua Marple / @JoshuaMarple1

03/26/2021 at 07:46PM

24
#53 - Olle Wiklund / @Kabix

04/18/2021 at 04:18AM

24
#54 - Daniel Qu / @danielq9871

05/03/2021 at 02:49PM

24
#55 - François Marais / @maraisf

05/21/2021 at 12:36AM

24
#56 - ThatGuyWithAWeirdHat / @Mousakaaa

07/17/2021 at 06:09PM

24
#57 - François / @mortyZZ

08/01/2021 at 08:54PM

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

02/01/2021 at 10:21AM

25
#59 - hamb / @hamb88140219

03/08/2021 at 02:11AM

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

04/06/2021 at 06:25PM