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 294 remaining solutions by signing in and submitting your own entry
#295 Meshan Naidoo / @realmeshan - Score: 227 - 01/14/24 @ 15:03
<Esc>jkjjjjwlyawjjjjjaa<Esc>uuujkkkkkkywa<Esc><Esc>jkyawjjjjjwwlhpa,<Esc>jkkkkkbhhhyawjjjjwwlllllllllllp<Esc>jkkkkkkjjbbhyawjjj4$<Esc>jkkjha,vimgolf put 6013804df3308e0009368f1c<Esc><Esc>ua<Esc>ha,<Esc>jkkkb<Esc>kbbjkhyawjjjwwwlllllllllllllllp<Esc>jkkkkjhhhhhhhhyawjj$<Esc>ha,<Esc>p<Esc>:wq<CR>

0 comments


Created by: @__ngtrongkha

295 active golfers, 1192 entries

Leaderboard (lowest score wins):
20
#91 - ippachi / @ippachi1018

08/08/2021 at 10:07AM

20
#92 - mevmev / @mevmev8

08/12/2021 at 05:19PM

20
#93 - Quentin Leroy / @qnleroy

08/22/2021 at 09:34AM

20
#94 - Rory Smith / @alan0buchanan

09/20/2021 at 11:14PM

20
#95 - Jean George / @JeanGeo20504212

11/19/2021 at 01:48PM

20
#96 - Patrick Rainey / @PatrickJRainey

11/30/2021 at 11:23AM

20
#97 - ys / @SYS_0704

12/05/2021 at 07:17AM

20
#98 - POSIX / @po6ix

01/07/2022 at 11:01AM

20
#99 - Paul Page / @theRealPaulPage

01/21/2022 at 10:58PM

20
#100 - JVIM / @JVIM101

02/24/2022 at 11:04AM

20
#101 - Janzen / @__Coos

10/07/2022 at 08:53AM

20
#102 - mindgitrwx / @mindgitrwx

12/06/2022 at 10:32AM

20
#103 - Florian Leitner / @flowing

12/06/2022 at 09:57PM

20
#104 - 비둘기 / @a7AUna3f37W54Fb

04/04/2023 at 12:38PM

20
#105 - 권민재 / @gommj0611

04/07/2023 at 07:27AM

20
#106 - 지선우 / @poom1937

04/08/2023 at 03:50PM

20
#107 - sjdfd / @sjdfd190584

04/14/2023 at 07:16AM

20
#108 - naka / @nak38223985244

07/20/2023 at 01:12PM

20
#109 - Geoff Liu / @geoff_liu

09/24/2023 at 03:30AM

20
#110 - Remus Dalrymple / @bornintheflames

12/17/2023 at 09:04AM

20
#111 - Matt Shen / @mattshen

01/23/2024 at 09:27AM

20
#112 - かみひろ / @km_hr

03/16/2024 at 12:52PM

20
#113 - persona-twotwo / @persona-twotwo

04/08/2024 at 04:56AM

20
#114 - Dal_Peng / @dalpang81

04/10/2024 at 02:19AM

20
#115 - 0spear / @0spear

04/10/2024 at 12:48PM

20
#116 - pp0ng / @pp0ng

04/12/2024 at 09:19AM

20
#117 - westray420 / @westray420

04/12/2024 at 10:43AM

20
#118 - KTH-1 / @KTH-1

04/13/2024 at 06:02AM

20
#119 - Kimchanyuuu / @Kimchanyuuu

04/13/2024 at 06:21PM

20
#120 - kanguk123 / @kanguk123

03/29/2025 at 06:08PM