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

0 comments


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

0 comments


Created by: @xiongyuwu

116 active golfers, 351 entries

Leaderboard (lowest score wins):
14
#31 - Sherab Giovannini / @shaddycls

05/02/2019 at 09:37PM

14
#32 - Francois Urquhart / @LostUrquhart

05/14/2019 at 08:40PM

15
#33 - Smylers / @Smylers2

12/29/2018 at 11:03AM

15
#34 - xiong yuwu / @xiongyuwu

12/29/2018 at 02:52PM

15
#35 - Server Zero / @assaflavie

12/29/2018 at 03:41PM

15
#36 - PuppySaturation / @PuppySaturation

12/30/2018 at 09:29AM

15
#37 - A / @777Android777

12/30/2018 at 08:16PM

15
#38 - Sergey Novik / @konnigun

12/30/2018 at 10:20PM

15
#39 - Plexigras / @plexigras

12/31/2018 at 01:39PM

15
#40 - Nikos Koukis / @bergercookie12

01/02/2019 at 06:55PM

15
#41 - 波波 / @sbob87

01/04/2019 at 01:52AM

15
#42 - tPenguinLTG / @tpenguinltg

01/06/2019 at 12:44AM

15
#43 - Lorenzo Swank / @lswank

01/06/2019 at 05:00PM

15
#44 - Fl4t / @Fl4t

01/06/2019 at 10:48PM

15
#45 - Florian Koch / @Florian27133494

01/09/2019 at 12:58PM

15
#46 - Mike Harris / @MikeMJHarris

01/09/2019 at 03:14PM

15
#47 - abgalphabet / @abgalphabet

01/12/2019 at 05:19AM

15
#48 - PJ Frazer / @pj_frazer

01/14/2019 at 01:27AM

15
#49 - Dax / @zacoxi

01/14/2019 at 05:00AM

15
#50 - LC / @leeren

01/23/2019 at 06:57PM

15
#51 - Daniel Steinberg / @dstein64

01/28/2019 at 06:42AM

15
#52 - tenteke / @kuskus3

01/28/2019 at 01:52PM

15
#53 - 默罕默德 / @Rt6RjEAJ987Woes

01/31/2019 at 01:28PM

15
#54 - xer0.5ive / @Bibekshah

02/02/2019 at 02:18PM

15
#55 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 07:36AM

15
#56 - noisevoid / @noisevoid

02/26/2019 at 07:02PM

15
#57 - sjcomp / @sjcomp

02/26/2019 at 07:08PM

15
#58 - Titouan Teyssier / @TitouanT_

03/01/2019 at 09:27PM

15
#59 - Groovy / @groovy9

03/07/2019 at 09:23PM

15
#60 - chenqiqi / @chenqiqi13

03/13/2019 at 06:27AM