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

0 comments


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

0 comments


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

0 comments


Created by: @xiongyuwu

145 active golfers, 438 entries

Leaderboard (lowest score wins):
14
#1 - Jon Krause / @jkrause314

12/28/2018 at 05:01PM

14
#2 - Artur Mróz / @MrozArtur

12/29/2018 at 03:23PM

14
#3 - Petro Тrouq / @zulolosi

12/29/2018 at 07:53PM

14
#4 - carly stan account / @theryangeary

12/30/2018 at 01:49AM

14
#5 - wes / @_weslly

12/30/2018 at 05:33AM

14
#6 - Jose Villalta 👨‍💻 / @PhilosoGeekDad

12/31/2018 at 05:05PM

14
#7 - John Braxler / @braxler

12/31/2018 at 09:41PM

14
#8 - Nate / @natedoran

01/01/2019 at 12:07AM

14
#9 - Daniel Hjelm / @dhjelm

01/01/2019 at 01:16AM

14
#10 - Phil Devitt / @GeneralHav0k

01/01/2019 at 01:20PM

14
#11 -  Martijn Engler / @MartijnEngler

01/01/2019 at 01:26PM

14
#12 - Visualizing Medicine / @VisualizeMed

01/02/2019 at 02:56AM

14
#13 - Andreas Nordahl / @andreasnordahl

01/02/2019 at 10:07AM

14
#14 - Igor Line / @igorlineee

01/02/2019 at 06:26PM

14
#15 - pankaj singh / @pankajsingh013

01/10/2019 at 06:31PM

14
#16 - Saki Gw / @Sakigw

01/11/2019 at 03:11PM

14
#17 - たくみー(転職ドラシル) / @reirei_As

01/15/2019 at 05:14AM

14
#18 - Mario Olofo / @mario_olofo

01/19/2019 at 02:06AM

14
#19 - Patrick Lavin / @LavinComputes

01/30/2019 at 05:02PM

14
#20 - Sebastien Nicoud / @sebnukem

02/03/2019 at 05:26PM

14
#21 - Turkey Man / @lvturkeyman

02/20/2019 at 06:22AM

14
#22 - ahm4711 / @ahm4711

03/05/2019 at 10:21PM

14
#23 - Emil Braserud / @Erdustiggen

03/17/2019 at 08:30PM

14
#24 - k24w24 / @k24w24

03/22/2019 at 02:58PM

14
#25 - wanghbxxxx / @wanghbxxxx

04/01/2019 at 03:12AM

14
#26 - zh0ng / @zh00ng

04/03/2019 at 12:19PM

14
#27 - james_bunch / @james_bunch

04/03/2019 at 07:15PM

14
#28 - alekfed / @alek_fed

04/14/2019 at 08:13PM

14
#29 - Gitsnik / @dracyrys

04/21/2019 at 01:46PM

14
#30 - Norbert / @mullno

04/26/2019 at 07:01PM