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
#31 - Sherab Giovannini / @shaddycls

05/02/2019 at 09:37PM

14
#32 - Urquhart #SurrenderBill / @LostUrquhart

05/14/2019 at 08:40PM

14
#33 - majo senf / @majo_senf

06/17/2019 at 07:43AM

14
#34 - Miłosz Łakomy / @foobar01123

06/18/2019 at 05:52AM

14
#35 - Sergey Ryabko / @sergey_ryabko

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

14
#45 - vimgolfer / @vimgolfer7

10/01/2019 at 01:12AM

14
#46 - Viktor Styrud / @ViktorStyrud

10/07/2019 at 01:50PM

14
#47 - Lory / @Lory46845742

11/08/2019 at 01:07PM

14
#48 - Melvin Cheung / @MelvinCheung

11/09/2019 at 03:36AM

14
#49 - pysnow530 / @pysnow530

11/25/2019 at 05:30AM

14
#50 - skamgolf / @skamgolf

12/17/2019 at 03:45AM

14
#51 - vicver09 / @vicver091

12/18/2019 at 12:34AM

14
#52 - Delon / @delonleonard

12/30/2019 at 06:40AM

14
#53 - JimmyGymglish / @JGymglish

01/15/2020 at 01:26PM

14
#54 - Jason Neylon / @jasonneylon

01/29/2020 at 09:58PM

14
#55 - countime / @countime1

03/12/2020 at 10:53AM

14
#56 - Costel Radulescu / @_wizard_

03/30/2020 at 11:13PM

14
#57 - 于吉星 / @fishermryn

05/28/2020 at 09:47AM

14
#58 - mindgitrwx / @mindgitrwx

09/16/2020 at 02:21PM

14
#59 - Jung Yeon Park / @park_jungy

01/11/2021 at 04:46PM

14
#60 - roudens / @roudens2

01/16/2021 at 08:21AM