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

Change part of a function name in multiple occurrences

Change the middle part of the function name in multiple places, preferably using the next and dot commands.

Start file
call_this_function()

_this_
  
  call_this_function()

 _this_

 call_this_function()
End file
call_that_function()

_this_
  
  call_that_function()

 _this_

 call_that_function()

View Diff

1c1
< call_this_function()
---
> call_that_function()
5c5
<   call_this_function()
---
>   call_that_function()
9c9
<  call_this_function()
---
>  call_that_function()

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 205 remaining solutions by signing in and submitting your own entry
#206 Nick Lucent / @NickLucent - Score: 26 - 02/22/19 @ 07:21
:%s/l_this_f/l_that_f/g<CR>ZZ

0 comments


#207 Phoon / @justflashhim - Score: 26 - 05/10/19 @ 16:27
:%s/l_this_f/l_that_f/g<CR>ZZ

0 comments


#208 Patryk Jachowski / @programatryk - Score: 26 - 09/17/19 @ 10:01
/ca<CR>ctfcall_that_<Esc>n.n.:wq<CR>

0 comments


Created by: @xiongyuwu

208 active golfers, 662 entries

Leaderboard (lowest score wins):
18
#181 - z_r_a / @z_r_a

10/21/2020 at 04:04AM

19
#182 - m397 / @m39752809546

04/28/2021 at 02:29PM

20
#183 - rg thomas / @rgt47

01/12/2019 at 12:42AM

20
#184 - lofoneax / @lofoneax

01/23/2019 at 04:10AM

20
#185 - OldBoy / @geirola

03/12/2019 at 12:09PM

20
#186 - Chris Shorrock / @EbinFlow

08/18/2019 at 05:29PM

20
#187 - theBecwar / @thebecwar

08/18/2019 at 08:49PM

20
#188 - Ariel Miculas / @ArielMiculas

09/19/2019 at 02:04PM

20
#189 - Aaron / @_Lordofthevoid_

11/29/2019 at 05:28PM

20
#190 - Jason / @roosjason

05/11/2020 at 06:56AM

21
#191 - Zeming Lin / @ebetica

01/17/2019 at 07:45PM

21
#192 - MGJoe93 / @mgjoe93

03/06/2019 at 05:53PM

21
#193 - zenwalker / @zenwalker93

03/10/2019 at 12:48PM

21
#194 - R1 Bwre / @Erw_Bi

12/13/2019 at 09:36PM

22
#195 - Scott Voyles / @zeitchef

12/28/2018 at 03:22PM

22
#196 - ΝΙΚΟΣ / @nikosef8ias

12/30/2018 at 12:34AM

22
#197 - Luis Rodriguez / @luisthecoder

01/03/2019 at 02:58AM

22
#198 - Brome / @Brome20887421

01/04/2019 at 05:57PM

22
#199 - XenoRiS / @XenoRiS1

02/16/2019 at 04:38PM

22
#200 - Florent Uguet / @FlorentUguet

07/19/2019 at 04:56PM

22
#201 - drGsus / @drGsus

07/29/2020 at 08:53AM

24
#202 - adir ohayon / @AdirKip

01/08/2019 at 12:23PM

24
#203 - Maarten Staa / @SeriousSpoon

02/27/2019 at 02:21PM

24
#204 - The Joe / @computerjoe708

03/18/2019 at 01:47AM

24
#205 - Vincent Carrier / @VincntCarrier

03/23/2019 at 03:19AM

26
#206 - Nick Lucent / @NickLucent

02/22/2019 at 07:21AM

26
#207 - Phoon / @justflashhim

05/10/2019 at 04:27PM

26
#208 - Patryk Jachowski / @programatryk

09/17/2019 at 10:01AM