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

0 comments


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

0 comments


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

0 comments


Created by: @xiongyuwu

181 active golfers, 568 entries

Leaderboard (lowest score wins):
16
#121 - Dmatrix / @Dr_Dmatrix

01/10/2019 at 06:28PM

16
#122 - hbdgr / @t_hbdgr

01/14/2019 at 10:18PM

16
#123 - wrglprmft / @wrglprmft

01/19/2019 at 08:49PM

16
#124 - Dominic Z / @thammaaa

02/01/2019 at 02:04PM

16
#125 - Michael Aquilina / @mikeaquilina4

02/02/2019 at 09:43PM

16
#126 - sfmogway / @sfmogway

02/14/2019 at 12:59PM

16
#127 - Zach Miller / @barizachsy

02/27/2019 at 03:38AM

16
#128 - Amado Antonini / @AmadoAntonini

03/14/2019 at 06:41PM

16
#129 - Laurent Atlan / @laurentatlan1

04/15/2019 at 09:17PM

16
#130 - Izaak van Dongen / @goedel_gang

04/28/2019 at 12:49AM

16
#131 - Floyd Gantt / @fgantt

07/12/2019 at 08:45PM

16
#132 - Vim Golfer / @VimGolfer6

08/06/2019 at 12:16PM

16
#133 - Connie Qi / @connieqi

08/08/2019 at 02:58AM

16
#134 - José / @AngelGaldamez

08/28/2019 at 03:09AM

16
#135 - Jan Balangue / @jbalang

01/05/2020 at 07:16PM

17
#136 - Marcio M Pereira / @iviarcio

12/30/2018 at 12:34PM

17
#137 - churaki / @churaki

01/25/2019 at 09:53PM

17
#138 - RockerZZY / @rocker_zzy

06/08/2020 at 04:32AM

17
#139 - Kaustubh Murumkar / @k_austub_h

09/26/2020 at 12:30AM

18
#140 - Valacar / @valacar

12/28/2018 at 08:29PM

18
#141 - Jonny Wilson / @thejondom

12/28/2018 at 11:39PM

18
#142 - Bruno / @Av31r3ns3

12/29/2018 at 10:43PM

18
#143 - Mauricio Ariza / @_hell_spawn

01/02/2019 at 06:54PM

18
#144 - Daniel Wolf / @DanielW06054976

01/03/2019 at 10:25AM

18
#145 - John Smith / @JohnSmi14480159

01/09/2019 at 07:24AM

18
#146 - Martins / @Martins88554972

01/13/2019 at 08:12PM

18
#147 - Blah Blah / @BlahBla08410389

01/20/2019 at 04:51PM

18
#148 - 강현 / @Applesquiz

01/22/2019 at 11:04AM

18
#149 - Ashley Harvey / @ashleyharvey87

03/08/2019 at 03:07AM

18
#150 - Gauthier B / @gogoprog

06/11/2019 at 11:17AM