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

179 active golfers, 687 entries

Leaderboard (lowest score wins):
31
#121 - Martin LOUAZEL / @Zbrahark

02/22/2021 at 08:13AM

31
#122 - vimgolf / @vimgolf9

04/01/2021 at 08:27PM

31
#123 - Oscar / @GraveRaven

05/27/2021 at 12:28PM

31
#124 - models / @zornificator

06/23/2021 at 10:11PM

31
#125 - jdfgjhsbd / @bli231957

09/11/2021 at 01:15PM

32
#126 - Fake Konto / @F4k3K0n70

02/13/2021 at 11:07AM

32
#127 - I made a video game ✨ / @startresse

03/05/2021 at 07:44AM

32
#128 - foobarbazqux12345 / @foobarbazqux121

03/05/2021 at 05:39PM

32
#129 - Russell Helmstedter / @RHelmstedter

03/28/2021 at 01:05AM

32
#130 - Kağan / @kaganyanikmeout

04/28/2021 at 02:58AM

32
#131 - Tanmay Chordia / @TanmayChordia1

05/17/2021 at 04:17AM

32
#132 - :wq / @write_quit_22

05/18/2021 at 05:40AM

32
#133 - nedlog / @nedlog18

05/18/2021 at 08:23PM

32
#134 - Andrew Ouzts / @andrew_ouzts

05/20/2021 at 05:33AM

32
#135 - 44 / @e__oioi

05/22/2021 at 12:50PM

32
#136 - Adam / @Adam75625825

06/26/2021 at 08:03PM

32
#137 - nullcasa / @nullcasa

07/14/2021 at 11:01PM

32
#138 - Michel Desjardins / @M8_Ofthegarden

08/11/2021 at 01:12AM

32
#139 - panakin skywalker / @_j3ffrey

08/31/2021 at 03:04PM

32
#140 - Shreeram / @Shrimpraam

09/08/2021 at 07:03PM

32
#141 - Bo Xie / @iebox

09/11/2021 at 01:14PM

32
#142 - 윤경호 / @GH_Yun2

12/05/2021 at 01:13PM

32
#143 - tarotbybye / @tarotbybyeart

03/03/2022 at 04:13AM

32
#144 - good enough ; 🌿 / @daisyymint

03/03/2022 at 03:17PM

32
#145 - タケ / @Take3832

04/24/2022 at 05:22AM

32
#146 - Omar Alawadhi / @OmarAla59544225

09/10/2022 at 05:38PM

33
#147 - Mauricio Ariza / @_hell_spawn

02/09/2021 at 06:47PM

33
#148 - Łukasz / @srokadev

02/18/2021 at 08:15AM

33
#149 - Swaraj Dash / @swarajdash_

11/17/2021 at 12:03AM

33
#150 - philip / @philip5530

03/03/2022 at 03:30AM