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):
44
#271 - Un Extraño / @link145m

07/30/2021 at 01:37AM

44
#272 - insomnia758 / @yakongxing

03/22/2025 at 03:02AM

47
#273 - jaggujajamensan / @jaggujajamensan

02/12/2024 at 10:55AM

48
#274 - Jin-hyeok Kim / @JinhyeokKim12

04/05/2023 at 01:44AM

48
#275 - Eugene Yalansky / @EugeneYalansky

06/21/2023 at 09:33AM

49
#276 - Julian Hoch / @julian-hoch

11/19/2023 at 06:10PM

50
#277 - Joachim Nyborg / @jnyborg

06/16/2021 at 09:03AM

52
#278 - yeonlee / @yeonlee13820351

11/10/2021 at 12:59PM

54
#279 - 关红伟 / @speed2exe

09/09/2021 at 05:27PM

56
#280 - tarsiec / @tarsiec

07/12/2021 at 11:10AM

56
#281 - Luca Carotenuto / @LucaCarote32207

07/08/2023 at 08:16PM

57
#282 - Sato Takayuki / @yukitaka1974

06/01/2021 at 07:34AM

57
#283 - lethalNeutrino / @lethalNeutrino

11/28/2023 at 01:04PM

58
#284 - Golfer / @golfplayervim

04/26/2023 at 03:37PM

60
#285 - steve bolo / @steve_bolo

08/04/2022 at 04:21PM

60
#286 - U G / @rozeannehd

03/18/2023 at 11:12PM

60
#287 - abgalphbetz / @abgalphabetz

07/20/2024 at 09:50AM

65
#288 - วทททท / @uhTOWreLzQy0JN5

03/02/2022 at 02:42PM

67
#289 - X audio / @X_xaudio

05/31/2021 at 05:56AM

69
#290 - Thitichote Chaimuang / @ThitichoteC

03/02/2022 at 04:51PM

69
#291 - nickGPT / @nickandbro

08/24/2024 at 03:10AM

75
#292 - 宋彤雨 / @SDNAnyFlow

08/20/2021 at 04:51AM

107
#293 - Kenneth Hyman / @kjhyman

04/27/2021 at 02:12PM

178
#294 - luGnio / @lugnio

12/22/2023 at 07:20PM

227
#295 - Meshan Naidoo / @realmeshan

01/14/2024 at 03:03PM