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

229 active golfers, 881 entries

Leaderboard (lowest score wins):
19
#61 - bpking1 / @bpking1

11/20/2023 at 03:30AM

20
#62 - geosucker / @geosucker

02/25/2021 at 06:33PM

20
#63 - der tanzbaer / @der_tanzbaer

03/10/2021 at 08:01PM

20
#64 - せいほう / @FICSQF

03/11/2021 at 07:54AM

20
#65 - treb / @treb03683130

03/12/2021 at 03:01PM

20
#66 - Paul Adlene / @AdlenePaul

03/15/2021 at 05:04PM

20
#67 - warwickrulez / @warwickrulez

03/30/2021 at 03:01PM

20
#68 - Jackmarocks / @jackmarocks

04/05/2021 at 01:34PM

20
#69 - Sven Kõiv / @KoivSven

05/09/2021 at 03:52PM

20
#70 - ゆに / @lededex

07/13/2021 at 08:13PM

20
#71 - ippachi / @ippachi1018

08/08/2021 at 10:07AM

20
#72 - mevmev / @mevmev8

08/12/2021 at 05:19PM

20
#73 - Quentin Leroy / @qnleroy

08/22/2021 at 09:34AM

20
#74 - Rory Smith / @alan0buchanan

09/20/2021 at 11:14PM

20
#75 - Jean George / @JeanGeo20504212

11/19/2021 at 01:48PM

20
#76 - Patrick Rainey / @PatrickJRainey

11/30/2021 at 11:23AM

20
#77 - ys / @SYS_0704

12/05/2021 at 07:17AM

20
#78 - POSIX / @po6ix

01/07/2022 at 11:01AM

20
#79 - Paul Page / @theRealPaulPage

01/21/2022 at 10:58PM

20
#80 - JVIM / @JVIM101

02/24/2022 at 11:04AM

20
#81 - Janzen / @__Coos

10/07/2022 at 08:53AM

20
#82 - mindgitrwx / @mindgitrwx

12/06/2022 at 10:32AM

20
#83 - Florian Leitner / @flowing

12/06/2022 at 09:57PM

20
#84 - 비둘기 / @a7AUna3f37W54Fb

04/04/2023 at 12:38PM

20
#85 - 권민재 / @gommj0611

04/07/2023 at 07:27AM

20
#86 - 지선우 / @poom1937

04/08/2023 at 03:50PM

20
#87 - sjdfd / @sjdfd190584

04/14/2023 at 07:16AM

20
#88 - naka / @nak38223985244

07/20/2023 at 01:12PM

20
#89 - Geoff Liu / @geoff_liu

09/24/2023 at 03:30AM

21
#90 - 김범준 / @kmbmjn

02/17/2021 at 01:36AM