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):
15
#121 - Karol Łukaszewicz / @Karolukaszewicz

06/25/2020 at 10:00AM

15
#122 - hepebexè / @hepebexe

12/20/2020 at 08:34PM

15
#123 - Jean George / @JeanGeo20504212

09/11/2021 at 09:00AM

15
#124 - x03n046 / @x03n046

05/17/2022 at 08:29AM

15
#125 - Brandon / @Brandon10678836

08/26/2022 at 11:57AM

15
#126 - someone / @IKvacenok

06/17/2023 at 11:59AM

15
#127 - moh ayaya / @AyayaMoh

09/16/2023 at 04:16PM

15
#128 - Diwakar Singh Parmar / @parmardiwakar150

08/28/2024 at 01:23PM

16
#129 - omrisarig / @omrisarig

12/28/2018 at 04:53PM

16
#130 - Dany Alexander Caro Saavedra / @DanyAlexanderC7

12/28/2018 at 09:32PM

16
#131 - Alex Standke / @xanderstrike

12/28/2018 at 11:59PM

16
#132 - Aru / @IAmAru

01/01/2019 at 02:58AM

16
#133 - Gilad Slonim / @SlonimGilad

01/01/2019 at 07:20PM

16
#134 - Slawek Ligus / @ooz_ie

01/03/2019 at 05:54AM

16
#135 - daveramirez / @daveramirez

01/03/2019 at 09:29PM

16
#136 - Francisco Magalhães / @FranciscoMags

01/06/2019 at 06:20PM

16
#137 - antoine mas / @aneomas

01/09/2019 at 09:47AM

16
#138 - Mat / @matpbo

01/09/2019 at 05:06PM

16
#139 - melts / @melts

01/09/2019 at 08:54PM

16
#140 - Will / @obiwan__k3n00bi

01/10/2019 at 12:36AM

16
#141 - Dmatrix / @Dr_Dmatrix

01/10/2019 at 06:28PM

16
#142 - hbdgr / @t_hbdgr

01/14/2019 at 10:18PM

16
#143 - wrglprmft / @wrglprmft

01/19/2019 at 08:49PM

16
#144 - Dominic Z / @thammaaa

02/01/2019 at 02:04PM

16
#145 - Michael Aquilina / @mikeaquilina4

02/02/2019 at 09:43PM

16
#146 - sfmogway / @sfmogway

02/14/2019 at 12:59PM

16
#147 - Zach Miller / @barizachsy

02/27/2019 at 03:38AM

16
#148 - Amado Antonini / @AmadoAntonini

03/14/2019 at 06:41PM

16
#149 - Laurent Atlan / @laurentatlan1

04/15/2019 at 09:17PM

16
#150 - Izaak van Dongen / @goedel_gang

04/28/2019 at 12:49AM