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):
16
#151 - Floyd Gantt / @fgantt

07/12/2019 at 08:45PM

16
#152 - Vim Golfer / @VimGolfer6

08/06/2019 at 12:16PM

16
#153 - Connie Qi / @connieqi

08/08/2019 at 02:58AM

16
#154 - Aioriya / @AioriyaDonk

08/28/2019 at 03:09AM

16
#155 - Jan Balangue / @jbalang

01/05/2020 at 07:16PM

16
#156 - :wq / @write_quit_22

06/12/2021 at 03:32PM

16
#157 - James / @Dronak

11/10/2022 at 07:26PM

16
#158 - RosaTryp / @RosaTryp

03/13/2023 at 09:35PM

16
#159 - かみひろ / @km_hr

03/17/2024 at 11:43AM

17
#160 - Marcio M Pereira / @iviarcio

12/30/2018 at 12:34PM

17
#161 - churaki / @churaki

01/25/2019 at 09:53PM

17
#162 - RockerZZY / @rocker_zzy

06/08/2020 at 04:32AM

17
#163 - Kaustubh Murumkar / @k_austub_h

09/26/2020 at 12:30AM

17
#164 - vimgolfaccfekxh / @vimgolfaccfekxh

10/30/2022 at 03:27PM

17
#165 - Pablo Acuna / @pacuna

11/04/2024 at 06:20PM

18
#166 - Valacar / @valacar

12/28/2018 at 08:29PM

18
#167 - Jonny Wilson / @thejondom

12/28/2018 at 11:39PM

18
#168 - Bruno / @Av31r3ns3

12/29/2018 at 10:43PM

18
#169 - Mauricio Ariza / @_hell_spawn

01/02/2019 at 06:54PM

18
#170 - Daniel Wolf / @DanielW06054976

01/03/2019 at 10:25AM

18
#171 - John Smith / @JohnSmi14480159

01/09/2019 at 07:24AM

18
#172 - Martins / @Martins88554972

01/13/2019 at 08:12PM

18
#173 - Blah Blah / @BlahBla08410389

01/20/2019 at 04:51PM

18
#174 - 강현 / @Applesquiz

01/22/2019 at 11:04AM

18
#175 - Ashley Harvey / @ashleyharvey87

03/08/2019 at 03:07AM

18
#176 - Gauthier B / @gogoprog

06/11/2019 at 11:17AM

18
#177 - GrimmT / @GrimmT10

11/01/2019 at 07:39PM

18
#178 - Coby Drexler / @CobyDrexler

01/09/2020 at 02:35AM

18
#179 - Joe Farnsworth / @JoeFarnsworth

03/23/2020 at 01:09AM

18
#180 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 07:24PM