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

142 active golfers, 526 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

19
#37 - Alessandro Cantini / @aecant

10/06/2021 at 05:09PM

19
#38 - Brendan Maginnis / @brendan_m6s

11/17/2021 at 02:16PM

19
#39 - 박세영 / @bagseyeong10

11/26/2021 at 04:05PM

19
#40 - unknown / @dongtaiwang1989

12/04/2021 at 06:23PM

19
#41 - José Medrano / @happylilmexican

12/08/2021 at 07:00PM

19
#42 - ややお / @yayaoh

12/23/2021 at 11:34PM

20
#43 - geosucker / @geosucker

02/25/2021 at 06:33PM

20
#44 - der tanzbaer / @der_tanzbaer

03/10/2021 at 08:01PM

20
#45 - せいほう / @FICSQF

03/11/2021 at 07:54AM

20
#46 - treb / @treb03683130

03/12/2021 at 03:01PM

20
#47 - Paul Adlene / @AdlenePaul

03/15/2021 at 05:04PM

20
#48 - warwickrulez / @warwickrulez

03/30/2021 at 03:01PM

20
#49 - Jackmarocks / @jackmarocks

04/05/2021 at 01:34PM

20
#50 - Sven Kõiv / @KoivSven

05/09/2021 at 03:52PM

20
#51 - ゆに / @lededex

07/13/2021 at 08:13PM

20
#52 - ippachi / @ippachi1018

08/08/2021 at 10:07AM

20
#53 - mevmev / @mevmev8

08/12/2021 at 05:19PM

20
#54 - Quentin Leroy / @qnleroy

08/22/2021 at 09:34AM

20
#55 - Rory Smith / @alan0buchanan

09/20/2021 at 11:14PM

20
#56 - Jean George / @JeanGeo20504212

11/19/2021 at 01:48PM

20
#57 - Patrick Rainey / @PatrickJRainey

11/30/2021 at 11:23AM

20
#58 - ys / @SYS_0704

12/05/2021 at 07:17AM

20
#59 - POSIX / @po6ix

01/07/2022 at 11:01AM

20
#60 - Paul Page / @theRealPaulPage

01/21/2022 at 10:58PM