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):
15
#91 - Nick Yeow / @nickyeow

05/22/2019 at 12:13PM

15
#92 - mkaminaga / @mkmng3

06/08/2019 at 04:27AM

15
#93 - duyanh.y4n.pham / @PhamY4n

06/12/2019 at 03:09PM

15
#94 - Matthew Rossman / @chimpman252

07/27/2019 at 07:59PM

15
#95 - Markus / @ARealAnnoyance

07/31/2019 at 01:30AM

15
#96 - Chester Yap / @Chest_ErYap

08/10/2019 at 01:43PM

15
#97 - Simon Wilkinson / @simondwilkinson

08/24/2019 at 02:48PM

15
#98 - Baine Wedlock / @BaineWedlock

09/24/2019 at 09:26AM

15
#99 - Miko / @_m_ik_o_

10/12/2019 at 04:08PM

15
#100 - Abner jr / @Abnerjr19

10/12/2019 at 05:43PM

15
#101 - Harrison / @ardentcow

10/31/2019 at 06:52AM

15
#102 - James Casey / @hanavi

12/21/2019 at 09:24PM

15
#103 - John Otters / @OttersJohn

12/23/2019 at 07:32PM

15
#104 - TimMcGuire / @mcguire

03/04/2020 at 10:37PM

15
#105 - floyd / @floyd10086

03/20/2020 at 10:05AM

15
#106 - Ryan Nevius / @ryannevius

03/23/2020 at 06:56AM

15
#107 - Moatvald / @moatvald

05/26/2020 at 05:44AM

15
#108 - Karol Łukaszewicz / @Karolukaszewicz

06/25/2020 at 10:00AM

16
#109 - omrisarig / @omrisarig

12/28/2018 at 04:53PM

16
#110 - Dany Alexander Caro Saavedra / @DanyAlexanderC7

12/28/2018 at 09:32PM

16
#111 - Alex Standke / @xanderstrike

12/28/2018 at 11:59PM

16
#112 - Aru / @IAmAru

01/01/2019 at 02:58AM

16
#113 - Gilad Slonim / @SlonimGilad

01/01/2019 at 07:20PM

16
#114 - Slawek Ligus / @ooz_ie

01/03/2019 at 05:54AM

16
#115 - daveramirez / @daveramirez

01/03/2019 at 09:29PM

16
#116 - Francisco Magalhães / @FranciscoMags

01/06/2019 at 06:20PM

16
#117 - antoine mas / @aneomas

01/09/2019 at 09:47AM

16
#118 - Mat / @matpbo

01/09/2019 at 05:06PM

16
#119 - melts / @melts

01/09/2019 at 08:54PM

16
#120 - Will / @obiwan__k3n00bi

01/10/2019 at 12:36AM