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):
18
#151 - Bruno / @Av31r3ns3

12/29/2018 at 10:43PM

18
#152 - Mauricio Ariza / @_hell_spawn

01/02/2019 at 06:54PM

18
#153 - Daniel Wolf / @DanielW06054976

01/03/2019 at 10:25AM

18
#154 - John Smith / @JohnSmi14480159

01/09/2019 at 07:24AM

18
#155 - Martins / @Martins88554972

01/13/2019 at 08:12PM

18
#156 - Blah Blah / @BlahBla08410389

01/20/2019 at 04:51PM

18
#157 - 강현 / @Applesquiz

01/22/2019 at 11:04AM

18
#158 - Ashley Harvey / @ashleyharvey87

03/08/2019 at 03:07AM

18
#159 - Gauthier B / @gogoprog

06/11/2019 at 11:17AM

18
#160 - GrimmT / @GrimmT10

11/01/2019 at 07:39PM

18
#161 - Coby Drexler / @CobyDrexler

01/09/2020 at 02:35AM

18
#162 - Joe Farnsworth / @JoeFarnsworth

03/23/2020 at 01:09AM

18
#163 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 07:24PM

18
#164 - z_r_a / @z_r_a

10/21/2020 at 04:04AM

19
#165 - m397 / @m39752809546

04/28/2021 at 02:29PM

20
#166 - rg thomas / @rgt47

01/12/2019 at 12:42AM

20
#167 - lofoneax / @lofoneax

01/23/2019 at 04:10AM

20
#168 - OldBoy / @geirola

03/12/2019 at 12:09PM

20
#169 - Chris Shorrock / @EbinFlow

08/18/2019 at 05:29PM

20
#170 - theBecwar / @thebecwar

08/18/2019 at 08:49PM

20
#171 - Ariel Miculas / @ArielMiculas

09/19/2019 at 02:04PM

20
#172 - Aaron / @_Lordofthevoid_

11/29/2019 at 05:28PM

20
#173 - Jason / @roosjason

05/11/2020 at 06:56AM

21
#174 - Zeming Lin / @ebetica

01/17/2019 at 07:45PM

21
#175 - MGJoe93 / @mgjoe93

03/06/2019 at 05:53PM

21
#176 - zenwalker / @zenwalker93

03/10/2019 at 12:48PM

21
#177 - R1 Bwre / @Erw_Bi

12/13/2019 at 09:36PM

22
#178 - Scott Voyles / @zeitchef

12/28/2018 at 03:22PM

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

12/30/2018 at 12:34AM

22
#180 - Luis Rodriguez / @luisthecoder

01/03/2019 at 02:58AM