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

246 active golfers, 970 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 / @dm_antonyuk

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

19
#43 - deusthe / @deusthe91

01/31/2022 at 08:19AM

19
#44 - blub blub / @xyDZdMNGzWLT

02/05/2022 at 04:15AM

19
#45 - redbigyesnoGoThenWhy / @redbigyesno

06/03/2022 at 11:04AM

19
#46 - Alex / @AlexanderHeatl2

07/11/2022 at 11:17PM

19
#47 - Sarang Khim / @sarang_khim

07/27/2022 at 09:33AM

19
#48 - Alex Lewin / @_AlexLewin

09/19/2022 at 07:01PM

19
#49 - DV1X3R / @DV1X3R

10/22/2022 at 05:54PM

19
#50 - ky05uk3 / @kyo89347563

03/12/2023 at 12:10PM

19
#51 - 이수지 / @iamsoojee

04/03/2023 at 05:18AM

19
#52 - 성우 / @seongu85669455

04/03/2023 at 12:13PM

19
#53 - FirstModus / @Nolimimer

04/09/2023 at 09:37AM

19
#54 - 병선 류 / @mnbv3135bs

04/12/2023 at 01:02AM

19
#55 - i just want to download stuff and not give my info / @rpgenespanish

04/14/2023 at 08:42PM

19
#56 - Игорь Квачёнок / @IKvacenok

06/14/2023 at 02:28PM

19
#57 - Topvimgolf Score / @topvimgolfscore

09/21/2023 at 11:07AM

19
#58 - HRD 센터 / @HRDCEN

10/17/2023 at 04:57PM

19
#59 - Luoyb / @Luoyb

10/24/2023 at 06:36AM

19
#60 - scpchicken / @scpchick

11/08/2023 at 06:13PM