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 9v006705493c000000000513

Change class fields from snake case to camel case

Change the class fields in this Scala class from snake case to camel case

Start file
case class User(
  id
: Long,
  username
: String,
  email
: String,
  first_name
: String,
  last_name
: String,
  age
: Int,
  gender
: String,
  phone_number
: String,
  address
: String,
  city
: String,
  country
: String,
  postal_code
: String,
  occupation
: String,
  company
: String,
  salary
: Double,
  is_active
: Boolean,
  registration_date
: java.time.LocalDate,
  last_login_date
: java.time.LocalDateTime,
  preferences
: Map[String, String],
  roles
: List[String]
)
End file
case class User(
  id
: Long,
  username
: String,
  email
: String,
  firstName
: String,
  lastName
: String,
  age
: Int,
  gender
: String,
  phoneNumber
: String,
  address
: String,
  city
: String,
  country
: String,
  postalCode
: String,
  occupation
: String,
  company
: String,
  salary
: Double,
  isActive
: Boolean,
  registrationDate
: java.time.LocalDate,
  lastLoginDate
: java.time.LocalDateTime,
  preferences
: Map[String, String],
  roles
: List[String]
)

View Diff

5,6c5,6
<   first_name: String,
<   last_name: String,
---
>   firstName: String,
>   lastName: String,
9c9
<   phone_number: String,
---
>   phoneNumber: String,
13c13
<   postal_code: String,
---
>   postalCode: String,
17,19c17,19
<   is_active: Boolean,
<   registration_date: java.time.LocalDate,
<   last_login_date: java.time.LocalDateTime,
---
>   isActive: Boolean,
>   registrationDate: java.time.LocalDate,
>   lastLoginDate: java.time.LocalDateTime,

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 70 remaining solutions by signing in and submitting your own entry
#71 Alex Li / @1liale - Score: 67 - 10/21/24 @ 19:58
:<50-53>:%s/\(_\)\(\w\)/\u\2/g<CR><Esc>[201~<Left><Right><Right><BS><BS><Left><Right>g<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><Right><CR>:wq<CR>

0 comments


Created by: @pacuna

71 active golfers, 183 entries

Leaderboard (lowest score wins):
13
#1 - Jean George / @JeanGeo20504212

10/08/2024 at 03:35PM

13
#2 - Peppa Pig / @PeppaPigSg

10/09/2024 at 12:29AM

13
#3 - Ivelin Angelov / @post2web

10/09/2024 at 02:33AM

13
#4 - ProggerX / @ProggerX

10/09/2024 at 07:03PM

13
#5 - ProGamerYeet / @ProGamerYeet

10/11/2024 at 03:56PM

13
#6 - Gianfranco 💙 OpenZeppelin / @BazziBazzani

10/12/2024 at 08:52AM

13
#7 - daniilsvirin / @daniilsvirin

10/12/2024 at 04:31PM

13
#8 - JMTed / @JMTed

10/12/2024 at 11:29PM

13
#9 - Michael Kebe / @michaelkebe

10/13/2024 at 11:34AM

13
#10 - Elisedlund / @Elisedlund

10/13/2024 at 06:14PM

13
#11 - rasputins / @rasputins

10/14/2024 at 05:22PM

13
#12 - Keane / @keanesc

10/15/2024 at 04:39AM

13
#13 - Adi / @adi2004

10/15/2024 at 06:13PM

13
#14 - got_windy / @insomnight

10/16/2024 at 07:55AM

13
#15 - Håkon Anders Strømsodd / @haakon8855

10/16/2024 at 08:43AM

13
#16 - Karim / @KarimIbrahim

10/16/2024 at 07:01PM

13
#17 - Alex Elarbee / @elarbee

10/17/2024 at 04:11AM

13
#18 - John Braxler / @braxler

10/17/2024 at 12:34PM

13
#19 - Nithin S Varrier / @0x006E

10/18/2024 at 08:36AM

13
#20 - mtklar / @mtklar

10/18/2024 at 02:33PM

13
#21 - demouo / @demouo

10/19/2024 at 02:32AM

13
#22 - Sandy1796ii / @Sandy1796ii

10/19/2024 at 05:38AM

13
#23 - ak@developer / @Ajay-056

10/20/2024 at 09:25AM

13
#24 - DerDer3 / @DerDer3

10/20/2024 at 07:27PM

13
#25 - Ban / @Rheriel

10/22/2024 at 06:05AM

13
#26 - Highlander Paiva / @hvpaiva

10/24/2024 at 11:15PM

13
#27 - aaay-aaay / @aaay-aaay

10/25/2024 at 05:33PM

13
#28 - Fredrik Robertsen / @fredrikr79

10/29/2024 at 11:03AM

13
#29 - Wim Stockman / @wimstockman

11/10/2024 at 08:56AM

13
#30 - Rodi-Janssen / @Rodi-Janssen

11/11/2024 at 08:09AM