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 5b71fa9105b5ca000ce4a7a1

convert yml into java pojo field

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

Start file
- browser: Chrome
  browserVersion: 63
  os: window7
  osVersion: 2012
  lang: en
End file
private String browser;
private String browserVersion;
private String os;
private String osVersion;
private String lang;

View Diff

1,5c1,5
< - browser: Chrome
<   browserVersion: 63
<   os: window7
<   osVersion: 2012
<   lang: en
---
> private String browser;
> private String browserVersion;
> private String os;
> private String osVersion;
> private String lang;

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 153 remaining solutions by signing in and submitting your own entry
#154 Jurica / @Jurica34581259 - Score: 59 - 11/14/18 @ 23:35
:%s/:.*//g<CR>0qaxxkq4@a:%s/^/private String /g<CR>:%s/$/;/g<CR>:wq<CR>

0 comments


Created by: @saurabh908583

154 active golfers, 584 entries

Leaderboard (lowest score wins):
34
#121 - Slawek Ligus / @ooz_ie

01/14/2019 at 07:51PM

35
#122 - some call me mattp / @mattpep

08/14/2018 at 05:22PM

35
#123 - Levi Self / @LeviRSelf

11/18/2018 at 09:32AM

35
#124 - zenwalker / @zenwalker93

03/10/2019 at 03:19PM

36
#125 - Shutterspot Photo / @shutterspot

08/14/2018 at 07:21AM

36
#126 - Sports Fan LaBerge / @BigBoiLaBerge

08/16/2018 at 08:29PM

36
#127 - Miki Tebeka / @tebeka

08/18/2018 at 01:22PM

36
#128 - Mark Oswald / @mrkosw

08/21/2018 at 01:46PM

36
#129 - Julià Mestieri / @julimestieri

09/13/2018 at 10:44AM

36
#130 - Dax / @daaawx

10/17/2018 at 03:54PM

36
#131 - Luis Rodriguez / @luisthecoder

11/12/2018 at 09:30PM

37
#132 - Jakub Horák / @kubahorak

08/20/2018 at 11:57AM

37
#133 - Paul Inc / @hiniol1982

10/18/2018 at 07:13PM

37
#134 - 永森 / @nagakei05

11/17/2018 at 07:15AM

37
#135 - tuyen / @tuyen66827418

11/22/2018 at 02:40PM

37
#136 - Oren Koriat / @KoriatOren

12/06/2018 at 02:00PM

37
#137 - Emil Braserud / @Erdustiggen

03/25/2019 at 09:02AM

38
#138 - Vanildo S. Mangueira / @vanildo_souto

08/14/2018 at 02:26PM

38
#139 - Di Peng / @DCodier

10/31/2018 at 12:45PM

39
#140 - Chris Maher / @chrismaherthe

11/15/2018 at 02:38AM

40
#141 - Simon Ingelsson / @_DeVVaN_

08/15/2018 at 03:05PM

40
#142 - Ryan Daniels / @RyanNeilDaniels

08/28/2018 at 08:35AM

40
#143 - rg thomas / @rgt47

10/23/2018 at 03:46PM

41
#144 - Chirag Joshi / @thechijos

08/14/2018 at 04:59AM

41
#145 - zhenshan Xue / @xzs572

08/22/2018 at 05:15AM

41
#146 - Ленар / @LShagiev

08/22/2018 at 06:14PM

41
#147 - Brent Woo / @BrentPWoo

10/02/2018 at 02:21PM

41
#148 - dogmeat / @dogmeat11

10/30/2018 at 02:44PM

41
#149 - Bruno Cunha / @bruncun

11/20/2018 at 01:33AM

41
#150 - beew71493 / @beew71493

12/18/2018 at 08:27PM