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

66 active golfers, 170 entries

Leaderboard (lowest score wins):
21
#61 - editor3D / @editor3D

11/17/2024 at 08:40PM

24
#62 - mariosar / @mariosar

10/15/2024 at 12:20AM

28
#63 - Peter Tillemans / @ptillemans

10/10/2024 at 09:36AM

37
#64 - Tom Anderson / @andogq

10/09/2024 at 04:12AM

53
#65 - PhinJ / @PhinJ

02/07/2025 at 07:13PM

67
#66 - Alex Li / @1liale

10/21/2024 at 07:58PM