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

0 comments


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

0 comments


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

0 comments


Created by: @xiongyuwu

146 active golfers, 439 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

14
#33 - majo senf / @majo_senf

06/17/2019 at 07:43AM

14
#34 - Foo Bar / @foobar01123

06/18/2019 at 05:52AM

14
#35 - Sergey Ryabko / @RyabkoSergey

07/01/2019 at 05:03PM

14
#36 - Neil Struthers / @struthersneil

07/18/2019 at 03:55PM

14
#37 - Rasmus Öhman Bruno / @rasmohman

07/23/2019 at 12:37PM

14
#38 - sooqua / @sooqua

08/08/2019 at 08:53PM

14
#39 - Joe Fahnestock🌵 / @Joecupojoe

08/09/2019 at 01:11AM

14
#40 - Ron Holt / @ron_holt

08/14/2019 at 06:44PM

14
#41 - averageRandomPerson / @averageRandomP1

08/20/2019 at 10:38AM

14
#42 - Martin Delille / @martinodelilo

08/24/2019 at 12:31PM

14
#43 - Adam Hartz / @awareofnow

08/27/2019 at 12:05AM

14
#44 - Cassandra / @kascein

09/17/2019 at 07:35PM

15
#45 - Smylers / @Smylers2

12/29/2018 at 11:03AM

15
#46 - xiong yuwu / @xiongyuwu

12/29/2018 at 02:52PM

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

12/29/2018 at 03:41PM

15
#48 - PuppySaturation / @PuppySaturation

12/30/2018 at 09:29AM

15
#49 - A / @777Android777

12/30/2018 at 08:16PM

15
#50 - Sergey Novik / @konnigun

12/30/2018 at 10:20PM

15
#51 - Plexigras / @plexigras

12/31/2018 at 01:39PM

15
#52 - Nikos Koukis / @bergercookie12

01/02/2019 at 06:55PM

15
#53 - 波波 / @sbob87

01/04/2019 at 01:52AM

15
#54 - tPenguinLTG / @tpenguinltg

01/06/2019 at 12:44AM

15
#55 - Lorenzo Swank / @lswank

01/06/2019 at 05:00PM

15
#56 - Fl4t / @Fl4t

01/06/2019 at 10:48PM

15
#57 - Florian Koch / @Florian27133494

01/09/2019 at 12:58PM

15
#58 - Mike Harris / @MikeMJHarris

01/09/2019 at 03:14PM

15
#59 - abgalphabet / @abgalphabet

01/12/2019 at 05:19AM

15
#60 - PJ Frazer / @pj_frazer

01/14/2019 at 01:27AM