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):
14
#61 - A A A / @37fatos

01/16/2021 at 08:28PM

14
#62 - 김범준 / @kmbmjn

05/10/2021 at 12:13PM

14
#63 - yancy / @yancy_dong

09/18/2021 at 08:34AM

14
#64 - Alex / @AlexanderHeatl2

07/06/2022 at 11:35PM

14
#65 - Janzen / @__Coos

10/05/2022 at 05:35PM

14
#66 - olivier chabot / @chabotlongboard

07/04/2023 at 12:25PM

14
#67 - Luoyb / @Luoyb

11/03/2023 at 12:58AM

14
#68 - Remus Dalrymple / @bornintheflames

01/03/2024 at 08:16PM

14
#69 - Don'tBeAlarmed / @DontBeAlarmed

05/29/2024 at 06:17PM

14
#70 - Peppa Pig / @PeppaPigSg

07/21/2024 at 09:38AM

14
#71 - nickGPT / @nickandbro

08/25/2024 at 02:52AM

15
#72 - "Smylers" / @Smylers2

12/29/2018 at 11:03AM

15
#73 - xiong yuwu / @xiongyuwu

12/29/2018 at 02:52PM

15
#74 - we’re going to need a bigger bot / @assaflavie

12/29/2018 at 03:41PM

15
#75 - PuppySaturation / @PuppySaturation

12/30/2018 at 09:29AM

15
#76 - A / @777Android777

12/30/2018 at 08:16PM

15
#77 - Sergey Novik / @konnigun

12/30/2018 at 10:20PM

15
#78 - Plexigras / @plexigras

12/31/2018 at 01:39PM

15
#79 - Nikos Koukis / @bergercookie12

01/02/2019 at 06:55PM

15
#80 - 波波 / @sbob87

01/04/2019 at 01:52AM

15
#81 - tPenguinLTG / @tpenguinltg

01/06/2019 at 12:44AM

15
#82 - Lorenzo Swank / @lswank

01/06/2019 at 05:00PM

15
#83 - Fl4t / @Fl4t

01/06/2019 at 10:48PM

15
#84 - Florian Koch / @Florian27133494

01/09/2019 at 12:58PM

15
#85 - Mike Harris / @MikeMJHarris

01/09/2019 at 03:14PM

15
#86 - abgalphabet / @abgalphabet

01/12/2019 at 05:19AM

15
#87 - PJ Frazer / @pj_frazer

01/14/2019 at 01:27AM

15
#88 - Dax / @zacoxi

01/14/2019 at 05:00AM

15
#89 - LC / @leeren

01/23/2019 at 06:57PM

15
#90 - Dan / @dstein64

01/28/2019 at 06:42AM