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

0 comments


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

0 comments


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

0 comments


Created by: @xiongyuwu

191 active golfers, 598 entries

Leaderboard (lowest score wins):
22
#181 - Brome / @Brome20887421

01/04/2019 at 05:57PM

22
#182 - XenoRiS / @XenoRiS1

02/16/2019 at 04:38PM

22
#183 - Florent Uguet / @FlorentUguet

07/19/2019 at 04:56PM

22
#184 - drGsus / @drGsus

07/29/2020 at 08:53AM

24
#185 - adir ohayon / @AdirKip

01/08/2019 at 12:23PM

24
#186 - Maarten Staa / @SeriousSpoon

02/27/2019 at 02:21PM

24
#187 - The Joe / @computerjoe708

03/18/2019 at 01:47AM

24
#188 - Vincent Carrier / @VincntCarrier

03/23/2019 at 03:19AM

26
#189 - Nick Lucent / @NickLucent

02/22/2019 at 07:21AM

26
#190 - Phoon / @justflashhim

05/10/2019 at 04:27PM

26
#191 - Patryk Jachowski / @programatryk

09/17/2019 at 10:01AM