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 54ddd1d261cec11d1b01707c

Mute the second method of this script

prepend a # infront of every line of the second method

Start file
def this_method_should_be_active
  here is happening something
end

def this_method_should_be_muted
  here is not happening anything
end

End file
def this_method_should_be_active
  here is happening something
end

#def this_method_should_be_muted
#  here is not happening anything
#end

View Diff

5,7c5,7
< def this_method_should_be_muted
<   here is not happening anything
< end
---
> #def this_method_should_be_muted
> #  here is not happening anything
> #end

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 232 remaining solutions by signing in and submitting your own entry
#233 Avi / @tomerlevi444 - Score: 58 - 02/15/15 @ 12:54
4j<c-v><Up><Up><Up><Up>4j<C-V>2jII<BS><Esc><Up><Up><Up><Up><Up>4j<C-C><C-C>I<Down><Down><Up><Up><Esc><C-C><C-C><Esc><Esc><Esc><Esc><Esc><Esc><Up><Up><Up><Up><Up>4j<C-V>2jI#<Esc>ZZ

0 comments


Created by: @netznarkose

233 active golfers, 439 entries

Leaderboard (lowest score wins):
9
#121 - Rami Hovi / @hacker_lawyer

05/27/2017 at 09:25PM

9
#122 - Turkey Man / @lvturkeyman

11/23/2017 at 05:22PM

9
#123 - DHM / @DHM29978992

04/30/2018 at 02:48AM

9
#124 - Arijus / @argshook

07/12/2018 at 12:23PM

9
#125 - Martynas Bardauskas / @mbardauskas

07/12/2018 at 12:27PM

9
#126 - Gytis Vinclovas / @GytisVinclovas

07/18/2018 at 05:46AM

9
#127 - Jonathan Gin / @jonathangin52

12/03/2018 at 07:35PM

9
#128 - Dax / @zacoxi

12/07/2018 at 05:06AM

9
#129 - Anant Mishra / @anantanni22

12/08/2018 at 03:00PM

9
#130 - Mihai / @mihaicristiant

01/16/2019 at 10:49AM

9
#131 - Ben M / @Sweet_Scientist

06/07/2019 at 03:27AM

9
#132 - Johannes / @joka253

06/17/2019 at 04:15PM

9
#133 - majo senf / @majo_senf

06/25/2019 at 10:15AM

9
#134 - Brandon Harrison / @llAboutB

09/25/2019 at 10:26PM

9
#135 - vimgolfer / @vimgolfer7

11/03/2019 at 07:17AM

9
#136 - Lory / @Lory46845742

12/02/2019 at 10:55AM

9
#137 - Miłosz Łakomy / @foobar01123

01/25/2020 at 03:56AM

9
#138 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:36AM

9
#139 - 김범준 / @kmbmjn

03/10/2021 at 08:04AM

9
#140 - hepebexè / @hepebexe

03/16/2021 at 10:15PM

9
#141 - Joe Farnsworth / @JoeFarnsworth

06/22/2021 at 04:09PM

9
#142 - mevmev / @mevmev8

10/06/2021 at 11:05PM

9
#143 - Jean George / @JeanGeo20504212

02/13/2022 at 06:08PM

9
#144 - z_r_a / @z_r_a

03/15/2022 at 02:45AM

9
#145 - ._. / @Katharsic

04/25/2022 at 05:48AM

9
#146 - russellzhaomao / @russellzhaomao

06/19/2022 at 02:57AM

10
#147 - Rodolphe Belouin / @rbelouin

02/13/2015 at 10:42AM

10
#148 - Josu Oyanguren / @josuoyanguren

02/13/2015 at 11:03AM

10
#149 - James / @Dronak

02/13/2015 at 12:32PM

10
#150 - Anoop Kumar / @anooplive

02/13/2015 at 01:35PM