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

0 comments


Created by: @xiongyuwu

102 active golfers, 305 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 - tweets about snakes / @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

15
#24 - Smylers / @Smylers2

12/29/2018 at 11:03AM

15
#25 - xiong yuwu / @xiongyuwu

12/29/2018 at 02:52PM

15
#26 - Server Zero / @assaflavie

12/29/2018 at 03:41PM

15
#27 - PuppySaturation / @PuppySaturation

12/30/2018 at 09:29AM

15
#28 - A / @777Android777

12/30/2018 at 08:16PM

15
#29 - Sergey Novik / @konnigun

12/30/2018 at 10:20PM

15
#30 - Plexigras / @plexigras

12/31/2018 at 01:39PM