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

0 comments


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

0 comments


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

0 comments


Created by: @xiongyuwu

181 active golfers, 568 entries

Leaderboard (lowest score wins):
18
#151 - GrimmT / @GrimmT10

11/01/2019 at 07:39PM

18
#152 - Coby Drexler / @CobyDrexler

01/09/2020 at 02:35AM

18
#153 - Joe Farnsworth / @JoeFarnsworth

03/23/2020 at 01:09AM

18
#154 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 07:24PM

18
#155 - z_r_a / @z_r_a

10/21/2020 at 04:04AM

20
#156 - rg thomas / @rgt47

01/12/2019 at 12:42AM

20
#157 - lofoneax / @lofoneax

01/23/2019 at 04:10AM

20
#158 - OldBoy / @geirola

03/12/2019 at 12:09PM

20
#159 - Chris Shorrock / @EbinFlow

08/18/2019 at 05:29PM

20
#160 - theBecwar / @thebecwar

08/18/2019 at 08:49PM

20
#161 - Ariel Miculas / @ArielMiculas

09/19/2019 at 02:04PM

20
#162 - Aaron / @_Lordofthevoid_

11/29/2019 at 05:28PM

20
#163 - Jason / @roosjason

05/11/2020 at 06:56AM

21
#164 - Zeming Lin / @ebetica

01/17/2019 at 07:45PM

21
#165 - MGJoe93 / @mgjoe93

03/06/2019 at 05:53PM

21
#166 - zenwalker / @zenwalker93

03/10/2019 at 12:48PM

21
#167 - R1 Bwre / @Erw_Bi

12/13/2019 at 09:36PM

22
#168 - Scott Voyles / @zeitchef

12/28/2018 at 03:22PM

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

12/30/2018 at 12:34AM

22
#170 - Luis Rodriguez / @luisthecoder

01/03/2019 at 02:58AM

22
#171 - Brome / @Brome20887421

01/04/2019 at 05:57PM

22
#172 - XenoRiS / @XenoRiS1

02/16/2019 at 04:38PM

22
#173 - Florent Uguet / @FlorentUguet

07/19/2019 at 04:56PM

22
#174 - drGsus / @drGsus

07/29/2020 at 08:53AM

24
#175 - adir ohayon / @AdirKip

01/08/2019 at 12:23PM

24
#176 - Maarten Staa / @SeriousSpoon

02/27/2019 at 02:21PM

24
#177 - The Joe / @computerjoe708

03/18/2019 at 01:47AM

24
#178 - Vincent Carrier / @VincntCarrier

03/23/2019 at 03:19AM

26
#179 - Nick Lucent / @NickLucent

02/22/2019 at 07:21AM

26
#180 - Phoon / @justflashhim

05/10/2019 at 04:27PM